Not posted for a while. There’s a few reasons for this. 1. DIY. 2. The Wire. 3. I’m working on a project that’s been in the pipeline for a long time.
Anyway, back in June last year I attended an introductory Arduino course run by Omniversity at Madlab, Manchester. It was great fun and I learnt a lot. Last weekend I attended another course at Omniversity looking at how Arduinos can be connected to the Internet using the Ethernet shield.
The course was, again, great fun and it was a pleasure to spend a day solely devoted to learning stuff. The lunch was great to – kind of mexican wraps from somewhere in the Arndale centre….
After an interesting introduction into the protocols that give us the Internet we delved into the exercises. First, we read sample temperature data from a test stream hosted by cosm.com (cosm let’s you upload and then retrieve data as a web service) and displayed the values using an RGB LED. We then set up the Ardunio to act as a webserver and serve a webpage, the background of which changed depending on the value of a light sensitive resistor.
The Cycling Indicator
Just before lunch we started looking at using the Arduino with the Twitter APIs. We made a Twitter indicator LED light up when tweet retrieval from a preset Twitter account contained a certain key word.
I (very) slightly adapted the code to have the LED light when I tweeted “Mike is cycling” from the user account. When I tweeted “Mike is not cycling” the LED went out. This week my 4 year old daughter has been watching for the light coming on so she knows I’m on my way home from work. In the future I’d like to adapt this so a cardboard model cyclist starts turning the pedals instead of the LED lighting. I need to invest in some servos.
Here’s a video showing the cycling indicator…
Here’s the code and a fritzing diagram.
My Binary Clock
In the afternoon we more or less dedicated ourselves to a task of our choice. I decided to make a binary clock by reading a Internet time server from the Arduino and displaying the time using LED’s.
It quickly became apparent that I didn’t have enough digital outputs on the Arduino Uno to cope with this. Seeing me struggle, one of the course tutors suggested I try something called Charlieplexing. A method of driving multiple LED’s from fewer outputs which utilises the one way property of an LED and persistence of vision if an LED is turned on and off fast enough – but I’m no electronics whizz. Charlieplexing is described with a nice diagram on Wikipedia here.
I used Charlieplexing to display the hours using 6 red LEDs driven from 3 pins. In truth I only needed 5 LEDs to this but what the heck. I then repeated the circuit with 3 more pins to drive another 6 green LEDs to represent the minutes. In order to spread the LEDs horizontally the circuit became a right “bumblef**k” of wires (a quote I heard from one of my all time favourite bands as they opened boxes of of leads and effects pedals when setting up for a show – “onward once more through the bumblef**k of wires!” – Man or Astroman?) but it works. Here’s the code and a fritzing diagram (screen shot below):
And a video of the clock in action…
Here’s some more Arduino projects I’d like to tinker with:
1. We have a glass dividing wall at work and it would be cool to show traffic conditions on the ring road using some strip LEDs.
2. The aforementioned moving model cyclist for the Mike’s Cycling Indicator.
3. Controlling a BigTrak (Mum and Dad got me one for my birthday last year – like being a kid again) over the web.