|
|
blizzard begins Friday, February 8 2013
Snow from the predicted blizzard was already falling when I got out of bed this morning, though it hadn't accumulated enough to interfere with additional gathering of wood from the tree I'd felled yesterday.
I wanted to replicate the capacitor-measuring functionality of the capacitor meter I'd built yesterday in an Atmega168 running within the Arduino environment, and I thought I had a good chance of pulling this off, because someone claimed to have made an open-source version of its firmware. But when I compiled this firmware and uploaded it to an Atmega168, it didn't work (though it did successfully display meaningless data on the LED readout, which suggested that I hadn't uploaded complete garbage). I found myself looking over the source of this firmware to see what algorithms it might have used, but it was all fairly opaque. Part of my problem was my feeling of rage every time the author failed to encapsulate the line of code to be executed on the success of an if statement with curly brackets. I know that it is passable syntax in C not to enclose single lines in an if statement's success block, but failing to do so makes the code much harder to follow, particularly if there is also an else statement, perhaps with an unbracketed failure block.
For linking purposes this article's URL is: http://asecular.com/blog.php?130208 feedback previous | next |