Modify LED Blink code.
LED, 220Ω resistor.
// Ian Leighton
// TUI 2011-08-31 /* modified 50ms version of: Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ #define pin 13 void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(pin, OUTPUT); } void loop() { digitalWrite(pin, HIGH); // set the LED on delay(50); // wait for a second digitalWrite(pin, LOW); // set the LED off delay(50); // wait for a second }