Programming

Flashing OpenLog Firmware in Ubuntu Linux

Posted in Programming, Technology on March 24th, 2010 by Bret Kuhns – 2 Comments

I recently hit a bug in the Sparkfun OpenLog v1.1 firmware that left the device useless. I found out the hard way that version 1.1 only supports up to 255 log files. Once it hits this limit the firmware doesn’t know what to do with itself and loops endlessly. This even prevents you from entering command mode where you could otherwise reset the log number. Nate Seidle at SparkFun quickly released an update, v1.2, to correct this problem I was having. But now I had to figure out how to flash the firmware on my OpenLog. It turns out the process is extremely easy in Ubuntu, but the GitHub documentation targets mostly Windows, so I decided to document the process for Ubuntu users from start to finish here. read more »

PHP Recursive Strings

Posted in Programming on November 29th, 2009 by Bret Kuhns – 2 Comments

I needed to construct a recursive string of regular expression patterns. Parts of a string may be built from another string which may also be built of other strings. If you’re familiar, think of production rules in a context-free grammar. If you’re not, then just take for granted this recursive string idea would be useful. I initially decided to build all my patterns into a single array, giving me a nice data collection to access them. I was also under the assumption that my recursive idea would work best with an array as the interpreter would have to account for all strings in the array at once. This would prevent order issues if one string relied on another but wasn’t yet declared. Unfortunately, PHP simply doesn’t seem to work as I had hoped. read more »