{"id":1313,"date":"2014-05-15T10:52:33","date_gmt":"2014-05-15T17:52:33","guid":{"rendered":"https:\/\/logicalelegance.com\/journey\/?p=1313"},"modified":"2014-05-15T10:52:33","modified_gmt":"2014-05-15T17:52:33","slug":"not-every-project-works-out","status":"publish","type":"post","link":"https:\/\/logicalelegance.com\/journey\/2014\/05\/not-every-project-works-out\/","title":{"rendered":"Not every project works out"},"content":{"rendered":"<p>I don&#8217;t think we talk about failure enough. Sure, everyone says &#8220;you have to fail, it is the best way to learn&#8221; but not one likes to talk about it.<\/p>\n<p>I thought about sharing a big failure story but I think, in the end, I&#8217;m not going to because it is also sad.<\/p>\n<p>Still, I can&#8217;t just close this and tuck it into my drafts folder (that is a scary and slightly hilarious place) so I&#8217;ll tell you about this thing I thought &#8220;I&#8217;ll just hack that together while I&#8217;ve got free time&#8221;.<\/p>\n<p>I made those motor boards (and I&#8217;m not ready to launch myself in to working on my posture shirt (though I probably should)). And I&#8217;m waiting for more hardware to make another ayok widget. But I do have the little dog stuffed animal, now with an RGB LED.<\/p>\n<p>What if it could snore? Or sort of breath? Or have a heartbeat?\u00a0Not for the ayok feature, just because it can be really comforting to be near something that is alive-ish and has no expectations. (I have real dogs, they have expectations. And my beagle thinks I&#8217;m stupid so that really helps my ego.)<\/p>\n<p>Anyway, I got the idea, have the hardware, and thought it would make a cute little demo. \u00a0I also have this thought\u00a0of trying to use the coin cells to con my hand into believing it touched something (briefly).<\/p>\n<p>I went for the Arduino so I could post it on github, write about it a bit. I had a slight plan to show the result to someone, but not a solid thing.<\/p>\n<p>I coded up a little command interpreter for Arduino&#8217;s serial port. Then I played with PWM, discovering that the timer configuration is annoyingly nontrivial. I was surprised as Electric Imp and mbed both hide the guts of PWM. I read timer sections of the ATmega328 datasheet, remembering how much I prefer other companies&#8217; method of information organization.<\/p>\n<p>I made commands for changing the duty cycle and the frequency. I make a little script parser so I could have a snore be inhale, snork, pause, exhale, pause, changing the duty cycle and frequency for each stage.<\/p>\n<p>But it didn&#8217;t work that well. The snore wasn&#8217;t all that consistent and the code freaked out sometimes. I fixed the freak-out by modifying my PWM code to use the overflow interrupt to reload the registers. But it still wasn&#8217;t good.<\/p>\n<p>And then my computer&#8217;s screen started acting really strangely, strangely in time with the PWM going on and off. I had the Arduino and motor board powered from my USB port. \u00a0The motor only takes ~0.5A and the Arduino isn&#8217;t a big load. Maybe it was just how dirty the power got. Or maybe it was completely unrelated.<\/p>\n<p>That was the last straw. My results weren&#8217;t good. The processor was more annoying to use than I expected. My end goal is fuzzy (and not in a cute-fuzzy sort of way).<\/p>\n<p>Motivating myself to do these projects requires me to like the project. Sure, there were times when the ayok widget was less than fun, debugging can be a grind. But this was just a mess all over. The most fun I had was with the command line parser.<\/p>\n<p>I could persist through this, maybe make something I don&#8217;t hate. Probably switch to an mbed to drive it, use a USB hub or external power, maybe get a selection of small motors. But I don&#8217;t really want to.<\/p>\n<p>The failure here is not in stopping. The failure is that I&#8217;m not learning anything.<\/p>\n<p>I know that with the right motor and PWM tuning I can get snoring working (I&#8217;ve done it before). I&#8217;m confident heartbeat isn&#8217;t tough. And I&#8217;m pretty sure I won&#8217;t be able to make a determination on my haptic hand-touching-wall thing because it won&#8217;t work and I won&#8217;t know whether to blame the mounting or\u00a0the code or the unreality of the situation.<\/p>\n<p>So, it is a little fail\u00a0and, accordingly, a\u00a0little depressing.<\/p>\n<p>And I&#8217;m not sure what I&#8217;m going to do next. I&#8217;m hoping to get a contract soon (maybe today, we&#8217;ll see). But I&#8217;m also borrowing a BeagleBone Black because I&#8217;ve been wanting to try it out. I don&#8217;t know what my plan is with that. I&#8217;ve also been pondering putting <a title=\"uclinux on wikipedia\" href=\"http:\/\/en.wikipedia.org\/wiki\/Uclinux\" target=\"_blank\">ucLinux<\/a>\u00a0on a Cortex-M3 devkit (NXP or ST? Or something else?). It is always nice to see how OSs go on processors. I could compare it to FreeRTOS or some of the other small OSs. Build up a library of what&#8217;s good for what. But that sounds soooo boring.<\/p>\n<p>Without a goal, I am far more likely to get discouraged.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I don&#8217;t think we talk about failure enough. Sure, everyone says &#8220;you have to fail, it is the best way to learn&#8221; but not one likes to talk about it. I thought about sharing a big failure story but I think, in the end, I&#8217;m not going to because it is also sad. Still, I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[54,26],"class_list":["post-1313","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-motor-board","tag-whiney"],"_links":{"self":[{"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/posts\/1313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/comments?post=1313"}],"version-history":[{"count":3,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/posts\/1313\/revisions"}],"predecessor-version":[{"id":1316,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/posts\/1313\/revisions\/1316"}],"wp:attachment":[{"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/media?parent=1313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/categories?post=1313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/tags?post=1313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}