Getting an LED to blink on an Arduino. Basics of Arduino Programming (Parts: Arduino UNO, Red LED, 330 ohm Resistor, Breadboard)
Share
How to get an LED to blink on the Arduino board as well as on the breadboard by using the Arduino IDE. Using the Arduino Sketch, a program is developed to make the onboard LED blink (see code below). Alternatively, an led can be wired from the Arduino (Arduino UNO in this example) to a breadboard that contains an LED and a 330 ohm resistor and the Sketch can refer to the pins on the Arduino, in this case, 12 and GND. Any GPIO (General Purpose Input/Output) pin can be used.
int LED = 13; // This number is changed to 12 for the breadboard example void setup() { pinMode(LED, OUTPUT); } void loop() { digitalWrite(LED,HIGH); delay(500); digitalWrite(LED,LOW); delay(500); }