Ceci est une ancienne révision du document !
Several months ago, I took the plunge and decided to risk buying a couple of cheap Arduino Nanos from China. These are still Arduinos – but just not from the original designers. They were listed on eBay for £3 each so I went for three of them. Apparently keeping it under £15 means no import tax, which turned out to be true.
The Nanos arrived complete with a dinky USB cable. I hooked it up to my laptop and tried running the blinking LED sketch. Error. Now I was worried. I feared the worst in that either they were damaged or just plain didn’t work. Then I realised that I hadn’t changed the Arduino model in the IDE menu. Oops!
With the LED sketch uploaded and running I now knew the Nanos were working. Great!
The plan for one Nano was to realise my dream of having indicators on my bicycle. First I dug out the old sketch for the spaceship panel which covered holding down a button to flash an LED. I removed the unnecessary code and comments and now had a Nano with one flashing LED when a button was held down. I now duplicated the button, LED and wiring and voila! Bicycle indicators!
Note that the Nano slots directly into the breadboard unlike the Uno which sits separately.
I did think about modifying the code so that pressing once would turn the LED on then pressing again to turn it off, but that might mean me cycling along with indicators flashing not realising I’ve left them on and, ultimately, draining the battery (which I’ll hook up later).
Obviously, this would now leave the breadboard and be physically soldered onto veroboard with wires running the length of the bicycle. But that’s for me to figure out later.
My (butchered) code is at: http://pastebin.com/urJPfr9C