Learning Arduino…
So I’ve been reading all about the Arduino microcontroller board and what it can do for quite a while -- between Make Magazine, their blog and a few other sites on my daily RSS Feed rotation (Hack-a-Day, Evil Mad Scientist Labs, oomlout, and plenty of others) I have had my appetite whet for getting back into some microcontroller firmware programming again…
After uploading the LED blinking ‘hello world’ app to and then playing with that, then making the LED fade in and out using PWM instead of just blinking, I had to find a project...
A few came to mind – but the first one is going to be using the Arduino as the node controller for what I hope will be a very cool signaling system at HCRR (Harrisburg Central Railroad – outdoor live steam hobby railroad, 7 1/2” gauge – more on that later…)
In any event, My first actual test sketch is just to see if I can get a button to make the led do something besides just turn off and on.
Real simple – and it worked even… The LED blinks at a 500mS interval initially, using an interrupt driven timer (not a delay, so I can actually read the button presses) then when I press the button, the blinking interval is reduced by 150mS so that the LED starts blinking faster… at least until you get down to 50mS when the LED is flashing wildly… then you hit the button one more time and it’s back to 500mS… cool. (well, at least to me).
So the next step is to get the XBee modules in so I can try to get two of these nodes to talk to each other, then beyond that, building a non-contact interface (Perhaps using a magnetic sensor or an RFID tag) so that an engineer on the RR can signal that they are entering a block and figure out the output signaling…