{"id":1433,"date":"2014-11-24T16:46:14","date_gmt":"2014-11-24T23:46:14","guid":{"rendered":"https:\/\/logicalelegance.com\/journey\/?p=1433"},"modified":"2014-12-09T12:42:12","modified_gmt":"2014-12-09T19:42:12","slug":"planning-ahead","status":"publish","type":"post","link":"https:\/\/logicalelegance.com\/journey\/2014\/11\/planning-ahead\/","title":{"rendered":"Planning ahead"},"content":{"rendered":"<p>The Adafruit\u00a0accelerometer did not arrive in time for my birthday and I really wanted to wear my ring to my party. I went to RadioShack and got a <a title=\"Who's got the button?\" href=\"http:\/\/www.radioshack.com\/spst-12vdc-50ma-smt-tact-switch-with-ground-pin-4-pack\/2750004.html\" target=\"_blank\">small momentary pushbutton<\/a>. I charged my 50mAh battery, clipped the leads and used tweezers to coil the stripped wires around power and ground. A few more tiny wires and it was working.<\/p>\n<p>I wore my ring several times over the weekend. It was pretty functional and didn&#8217;t need charging (yay for sleep mode!). The wires were a little fiddly so if I took the ring on and off or handed it around, sometimes it would reset and be flaky but pushing the ring blank back on usually fixed it.<\/p>\n<p>As I was passing it around or fixing it or just playing with it, someone asked if it could do Magic 8 Ball instead of vocabulary and down the rabbit hole I fell.<\/p>\n<p>With a button, well, it can only do one thing. But the accelerometer identifies (interrupts on) taps, double taps, and portrait\/landscape changes. It can also do thresholds so I suppose it would recognize punches as well (air punches! real ones would definitely break the wiring!).<\/p>\n<p>Right now, I have 200 words, some of the definitions are poorly formatted, there are only 60-ish characters allowed so if the definition is longer it gets cut off. I tried to prevent that but the cutoff is probably 62 instead of the 66 I used so a few definitions are missing the last bit. However, with the 130 <a title=\"GRE vocab words\" href=\"https:\/\/www.msu.edu\/~defores1\/gre\/vocab\/gre_vocab.htm\" target=\"_blank\">GRE vocabulary words<\/a> and the 70 strange <a title=\"Erin's word list\" href=\"https:\/\/www.wordnik.com\/users\/erinmckean\/favorites\" target=\"_blank\">wordnik<\/a> words, it is a fairly amusing mix.<\/p>\n<p><a href=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-11.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1434\" src=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-11-300x258.jpg\" alt=\"MicroView ring\" width=\"300\" height=\"258\" srcset=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-11-300x258.jpg 300w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-11-1024x881.jpg 1024w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-11.jpg 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>For some reason, though, the ring really likes the word &#8216;turpitude&#8217; (which means depravity or wickedness). The randomness is working well except for that word coming up more often than I&#8217;d expect. I&#8217;m trying not to read anything into it.<\/p>\n<p>Anyway, I still have about 5k of flash space. Magic 8 ball responses will be easy, they are small. It can\u00a0do a portrait\/landscape interrupt as I turn my wrist around so I&#8217;ll put up &#8220;Think of a question!&#8221; and then another turn back and forth (P\/L interrupt) will get the random yes\/no\/maybe response. Though really, a tap or double tap might as well get the response.<\/p>\n<p>But, what should it do with a double tap? (I just thought up a punch so I&#8217;m going let that percolate a bit.) My husband asked if the ring could play pong, using the angle of the ring to move the paddle I thought about that and found that someone has already done that work for me (<a title=\"Pong on MicroView\" href=\"https:\/\/www.youtube.com\/watch?v=UitQD64Nw2o\" target=\"_blank\">video!<\/a>). I only need to replace their pot with\u00a0tilt sensing.<\/p>\n<p>After getting a little frustrated with trying to make the state machine work from inspection, I decided to stop doing that thing where I don&#8217;t apply professionalism to my personal projects. Thus,\u00a0I made a flowchart to decide how it will work.<\/p>\n<p><a href=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-21.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1435\" src=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-21-300x186.jpg\" alt=\"flowchart\" width=\"300\" height=\"186\" srcset=\"https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-21-300x186.jpg 300w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-21-1024x635.jpg 1024w, https:\/\/logicalelegance.com\/journey\/wp-content\/uploads\/2014\/11\/photo-21.jpg 1280w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I need UPS to arrive with\u00a0the accelerometer so I can test the implementation of this mini-beast.\u00a0In the meantime, I probably should make a few more ring blanks, these are all probably a bit small to work with the accelerometer and the battery.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Adafruit\u00a0accelerometer did not arrive in time for my birthday and I really wanted to wear my ring to my party. I went to RadioShack and got a small momentary pushbutton. I charged my 50mAh battery, clipped the leads and used tweezers to coil the stripped wires around power and ground. A few more tiny [&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":[5,63,64],"class_list":["post-1433","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-gadgets","tag-microview","tag-wordy"],"_links":{"self":[{"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/posts\/1433","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=1433"}],"version-history":[{"count":1,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/posts\/1433\/revisions"}],"predecessor-version":[{"id":1436,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/posts\/1433\/revisions\/1436"}],"wp:attachment":[{"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/media?parent=1433"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/categories?post=1433"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/logicalelegance.com\/journey\/wp-json\/wp\/v2\/tags?post=1433"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}