Saturday, May 30, 2009

Software Enhancements

I've made a lot of changes to the software during the last week. For starters, I cleaned up the web server implementation and turned it into a general-purpose Arduino library named WiServer; I posted it as open source on the Async Labs website forum so that others can use it.

The code has also been optimized for RAM usage by placing lots of the web page strings in program memory. This means they do require special treatment to use them, but since that capability has been added to the WiServer's print and println methods, it's not a big deal.

I've also added new web features. You can now set the smoker target temperature via the web; I'm using GET to post the data as part of the URL, though I may add POST support to the server in the future. I've also added code to store the target temperature in EEPROM, that way it'll pick up right where it left off if board is reset. I'll probably move all of the configuration data to EEPROM, that way the code doesn't need to be updated just to change the IP address or Wifi SSID.

There's also support for a raw data URL that returns a comma-delimited line of text containing the current time and basic operational data of the unit. A simple bash script on my PC uses CURL to retrieve the raw data and append it to a file every 15 seconds:

for (( ; ; ))
do
curl qpid.webhop.org/data >>data.txt
sleep 15
done

I can then import the resulting text file into Excel and plot the data over time, which will be very useful for evaluating and tuning the PID algorithm.

No comments:

Post a Comment