Arduino Blink programs

LED Blink. Enter and test this program.
Look at this code to blink a single light on and off each second.

/* Title: LED blink program by Mrs-O-C */
const int ledPin = 13;

void setup(){
  pinMode(ledPin, OUTPUT);
}

void loop() {
  digitalWrite(ledPin, HIGH);
  delay(1000);
  digitalWrite(ledPin, LOW);
  delay(1000);
}
  1. DOUBLE BLINK:

    • Modify the program to blink a separate LED on a different Pin, on when this is off, and off when this is on. Here are some additional instructions and details.


  2. Motion sensor reaction

    • Attach a motion sensor as show here.
    • make both LEDs light up when motion is detected.
led
motion wire motion