Beta Testing

4th of July, 1pm.  The smoker’s been running empty for about an hour and the ribs just went on.  The remote temperature monitor app has also been running.  I think the difference between my Maverick is due to some of the thermocouple being outside of the smoker, so I just need to compensate for the 10-15° difference.

Remote Temperature Monitor (beta version)

There was much coding done today.  The beta version of the remote temperature monitor app is finished and will be getting a trial run with a batch of ribs for the July 4th holiday.  I have a Maverick wireless thermometer to verify the temperature readings.  It works pretty well but the range sucks, which is why I hacked together all of the following.

Let’s take a look at how all this comes together.

The Arduino is parked outside next to my Weber Smokey Mountain with the thermocouple running under the lid.

It’s using a thermocouple and a MAX6675 chip to send data via a USB extension cable to a Linux netbook.

The Linux box runs a cronjob once a minute, grabs a few temperature readings (cat) and posts the data up to a PHP page (curl) which stores it in a MySQL database.  We use some regex to parse the temperature reading out to its own field.

The web server has a PHP page with an API for performing various actions.  For example. we can return the latest temperature as JSON.

[{"ID":"6337","TemperatureData":"104.45 104.45 104.90 104.90 ","Timestamp":"2011-07-03 14:10:11","Temperature":"104.90","Parsed":"1"}]

The Android app is written as a sticky foreground service and it has a client app to view the temperature data, change alarm settings, etc.

The high and low temperature alarms are adjustable and the app will beep and vibrate the phone for one second when an alarm occurs, but we can turn off the beeping if necessary.

Using the AlarmManager class, we set up a repeating task to download the latest temperature and parse it using Gson.  There is a continuous notification showing the latest temperature.  If there’s been no updated temperature data in the last 15 minutes (say a squirrel stole the Arduino), we throw up an additional notification as well as vibrate/beep the phone.

The Nexus One can do colored LED notifications, so it also flashes the LED yellow to indicate a data problem.

If the temperature falls outside the high/low range, we throw up a notification/vibrate/beep thusly.

We flash the LED red if it’s too hot…

…and blue if it’s too cold.

If all goes well tomorrow, I’ll have a nice set of data and will work in some line graphs with Google Charts.  The Arduino also needs some sort of enclosure for long-term outdoor use.

Getting warmer

The first part of my master plan is done.  I’m now able to get data from the thermocouple to the Arduino, then using a cron job on my Ubuntu netbook, read the data via USB, stick it in a file and upload it to a PHP script to store in MySQL.

The next step is to write some PHP code to return the data in JSON and an Android app to consume it.

A couple weeks of bacon

A few weeks back, I had the silly idea of making a lorem ipsum generator using types and cuts of meat instead of the standard Latin text. Some PHP code and a slightly modified WordPress theme later, Bacon Ipsum was born.

It went live on June 6th.  A few friends tweeted it, it got retweeted a few times and went viral a couple days later.  It even made it on Gizmodo.

It’s had 167k visitors since then and is still getting about 3-4k people a day.

Maybe I should make some t-shirts…  🙂