We received some new gear from Freetronics and have had a lot of fun experimenting this week. This is our attempt to summarize things we learned and share some example applications.
Here’s what we have from Freetronics: Eleven Microcontroller, Ethernet Shield, and Power-over-Ethernet Injector. All of these items were engineered by Freetronics in Victoria Australia. The “Eleven” is inspired by the Arduino Uno microcontroller development board, but Freetronics has made some great improvements and also subtle improvements. We noticed right-away that the Eleven uses a Mini USB connector, has a prototyping area, and the indicator LEDs are on the edge of the board. Taking a closer look, we also see two crystals — one for the USB chip and one for the ATmega328P MCU. I have been an Arduino user since the beginning and it’s been fun seeing the evolution. Freetronics has made a huge leap forward with this design, manufacturing quality, and implementation of the Arduino platform. I hope to see more Freetronics based projects – seeing is believing!
The products from Freetronics came in nice packaging, a reusable plastic parts tray, and instructions.
A nifty feature is the packaging itself. You can convert the box into a storage box. I was also surprised to get a Mini USB cable. I didn’t have to go searching in the “bin o’tangled cords”.
Installing the Freetronics Eleven
Connect the Freetronics Eleven to a USB port using the supplied Mini USB cable. If you are using Windows, you must supply an information file to setup the Eleven as a serial device. This step is a one-time thing on a Windows machine. On other OSs, like Linux or Mac, the Eleven is plug-and-play. If you are already familiar with using Arduino products, then you will be up and running in no time, as the Eleven is a similar experience.
Setup the Arduino IDE for the Freetonics Eleven Microcontroller
At the time of writing, the latest Arduino IDE is Arduino 0022. Download and execute the IDE.
Arduino IDE Configuration:
- Tools > Board > Arduino Uno
- Tools > Serial Port > (select the COM port that the Freetonics Eleven is using)
There are so many ideas we have. Here’s a short list of some that may inspire you to get started with the Freetronics devices + ThingsSpeak web services.
- Log sensor data to ThingSpeak
- Make a Freetronics Eleven Status Updater
- Scatter Sensors and Controls Around the House using Power-over-Ethernet
- Create an early warning detection system using environmental data
The “Do I need a Jacket?” Project
In our brainstorming, we liked the idea of an early warning system. So, we are going to use the Freetronics Eleven to send serial commands to the ioBridge IO-204-PRO to alert us if we need a jacket on our way to work tomorrow. We will take advantage of the onboard LED on the Freetronics Eleven development board. When the red LED is on, you should grab your jacket on the way to work.
The ioBridge IO-204-PRO has a dedicated serial line. This serial line allows for many things, but in this tutorial we will take advantage of its ability to gateway simple serial commands to web resources. Connect the Freetronics Eleven serial lines (TX/RX) and ground (GND) to the IO-204-PRO module’s expansion port.
Here are the pin-outs of the ioBridge IO-204-PRO expansion header:
We are going to use ioBridge’s Serial Web Services API to command the ThingHTTP App on ThingSpeak. All that Freetronics has to do is send a simple serial command to the ioBridge module and ThingHTTP will get the data we are interested in from Google Weather, parse it, and relay it back to the Freetronics Eleven MCU. What’s nice about using ThingHTTP for this is that the Freetronics Eleven will not have to parse any complex data structures which will save code space and let it focus on what it does best.
Create ThingHTTP Request
Our project is using ThingHTTP to get tomorrow’s low temperature from the Google Weather forecast.
- Sign into ThingSpeak
- Click Apps
- Select ThingHTTP
- Click Create New Request
- Enter a Name for your new request: Google Weather
- Enter the Google Weather URL with your Location: http://www.google.com/ig/api?weather=Pittsburgh+PA
- Select GET method
- Add a Parse String: forecast_conditions.low.data
- Click Update Request
The magic is with the parse string: “forecast_conditions.low.data”. This will extract tomorrow’s low temperature from the XML reply from Google’s weather API. Here’s a live example: Click Here for My Low Temperature Tomorrow.
Sending Commands to ioBridge
It’s easy to get resource from the web using ioBridge. ThingSpeak functionality is integrated into the API, so all you have to do is send this command on the Freetronics Eleven (or technically any device that can send and receive serial data):
Use your ThingHTTP request key for your ThingHTTP request.
Attached is the entire sketch to get the Google Weather forecast for tomorrow’s low temperature and use it to control the on-board LED on the Freetronics Eleven. It’s rather straightforward and I have documented the source code to help you along. Here is the Arduino Sketch that you upload from the Arduino IDE to the Freetronics Eleven: ThingHTTP_Forecaster.pde
Burr, it’s going to be 66F in the morning! Do I need a jacket? Maybe my patented hoody, or better yet, a windbreaker.