SJSD - blogg og notater om mine DIY

Serial input

Since I only have some LEDs to play with I had to be “creative”. So I have tried different ways to program my LEDs to light.

This time I have been using the serial console in the Arduino enviroment software.

This is how it’s works:

By entering the numbers from 0 to 3 I make one of the four LEDs connected to the Arduino to light for some milliseconds.

Here is the code: https://gist.github.com/sjsd/5375179

https://gist.github.com/5375179

It’s not so easy to see on the sketch below, but each LED is connected to a output, then through a resistor back to ground. Each LED is connected to their own output. I have used output 10 to 13.

image