Home‎ > ‎Projects‎ > ‎The Home Automation System‎ > ‎


I've made a huge mistake

While waiting for my boards to come back from fabrication (they should be here tomorrow OMG SQUEEE) I decided to do some software work.  Early on in the process I made a slight little design error.  I made the piece of the stack that's gonna live on the Beagle Bone a bit more complicated than it really should be.  Naturally, rather than admitting my mistake I plowed forward.  At this point I think I have half-dozen(?) threads in the 'logic core'.  It took effort to make sure that there are no race conditions and that all the locking mechanisms have time-out provisions and that if so much as a mouse farts two blocks away the process abends in a glory of verbose log output.

Additionally, early on I decided that staring at hex dumps while trouble shooting sucked so I decided that the IO board should produce output suitable for direct human consumption.  Think proper debug and log output.  At the same time (or nearly enough at the same time; brain-box does not have a timer with sub-second resolution) I thought a compact protocol devoid of the superfluous-purely-for-humans fluff would be a boon for performance.  And then I thought:

So what I ended up with is an IO board protocol that mixes binary messaging for low level stuff with text messaging for human consumable stuff.

This has proven to be quite a bit of a pain in the ass to implement, but it's done.  I would have to say that the fourth hardest part was setting up the serial port driver to accept and pass on to my process binary data without first molesting it.

Next step is to put together the Beagle Bone expansion shield tomorrow and start the assembly of the revision B of the board on Wednesday.