This is the first ‘getting started’ circuit that makes an LED blink on and off as per the Ardx explanation. The circuit is nice and simple using just the big LED, a 560 ohm Resisitor (Green-Blue-Brown) and a wire to link the positive leg (long) of the LED to the digital pin 13 on the Arduino.
insert circuit diagram here or view the overlay.
I’ve connected the Arduino to my iMac, selected the appropriate port (/dev/tty.usbmodemfa121) and saved and uploaded the code. Once it was working I also played with the delay times for a more calming flash.
Other things to try:
1 – Changing the pin – move the wire that comes from the positive pin of the LED to another pin on the Arduino and then update the ledPin value to match.
2 – Changing the blink time – already done that 😉
3 – Control the brightness – You can move the pin output from a digital to analog out and use analogueWrite(ledPin, brightness) to set the required brightness ranging from 0 to 255.
4 – Fading – using the above skills and some extra code its possible to fade the LED in and out.