|
|
something as simple Monday, September 28 2015
The day was warm and humid like summer, causing me to break a real sweat on today's firewood-gathering foray. I was fairly close to home on the terrace below the Stick Trail, and because I was ranged a bit down the slope from the terrace itself, I found new fallen skeletonized oaks to exploit, including one that produced a single chunk from just above its roots that constituted the bulk of today's load, which came to 111 pounds.
At various times today, I made further progress with my homemade ("Ahmed Mohamed Memorial") clock. Today I began addressing the issue of providing a real user interface beyond the serial-based interface I'd been using. For that, I needed some sort of button array, but all the ones I I had were too big for such a modest device. I wanted four or five buttons, not a 12 key phone pad or a 16 key matrix. The diversity of key matrices available online is surprisingly small, with nothing available bigger than 20 keys and seemingly none with five to 11 keys. Luckily, an old Curtis clock radio in my junk bin happened to have a key array featuring seven buttons (though two were duplicates). Unfortunately, because of wasted permutation opportunities, it required seven Arduino pins to read (though that's not much of a problem given the modest pin needs of this particular application). After I had its matrix figured out, I wrote the Arduino function that would provide a user interface once one of those buttons are pushed. After some consideration, I decided the function would store a copy of the existing time and then permit the user to advance a cursor back and forth through the time, changing any digit as needed by using buttons that either incremented or decremented the displayed value. To show the cursor, the Arduino substitutes in an underscore in place of the digit the cursor is at and then shows the digit, repeating the process rapidly. Because the font being used is a proportional one (with different characters having different widths), I had to make a suite of different underscore characters, and when deciding which to use, my code has to examine the character under the cursor and look up how wide it is. This all sounds rather complicated, but by some miracle the coding gods were on my side, and my width-looking-up code (which used the previously-unknown Atmel function memcpy_P) worked on the first try. It's amazing how much thought has to go into something as simple as a digital clock interface and I'm finding this an unexpectedly useful exercise.
This evening after climbing into bed, I read the final quarter of a book I'd been reading rather slowly since finishing the Martian (the only other novel I've attempted to read since 2008). After the Martian, I'd liked the feeling that reading a novel had given me, so I'd asked Gretchen to select me another one from her rather large private collection of literature. She's selected My Abandonment, the tale of a girl and her father living rough in a makeshift shelter in the forest just outside Portland, Oregon. As with any good novel, the tale gradually opens the camera to show a wider and wider view until a number of surprising things are learned. But in this case, the conceit of the novel hems it in a bit much; everything we learn is told to us by a rather distant and naïve 14 year old girl. I found this perspective a little unsatisfying, particularly when our young narrator seemed to hurry through details (such as whatever the hell was going on in that godforsaken yurt). I don't think I'm spoiling anything by saying that the only deaths that take place during the timeline of the book are the result of two unrelated freakish electrical mishaps.
For linking purposes this article's URL is: http://asecular.com/blog.php?150928 feedback previous | next |