Turn on a LED with Arduino
- Software used: Processing IDE for Arduino
- Arduino UNO & cables & LEDs from Arduino kit
1. Create the circuit
- for this step, I chose not to use the breadboard and connects cables in between, but just to add the LED to the Arduino board pins
- followed the schema from Figure 1 below – the schema is made with Fritzing – check: http://fritzing.org/home/
- the shorter leg of the LED is connected to Ground and the longer led to pin 13 (for receiving energy)
2. Program the Arduino
- opened a new file in Processing IDE
- on the menu on top I clicked on Open -> 01.Basics -> Blink
- the blink mode appeared and I had to change the code for pinMode(pinNumber, OUTPUT) to pinMode(13, OUTPUT) accordingly to the circuit.
- same for digitalWrite(pinMode, voltageLevel) -> digitalWrite(13, HIGH) under the loop() method.