LED Blinking

Introduction: LED Blinking

step one: build the circuit

step two: write the code

Code

//Blinking_LED

//turn on the LED for half a second, then off for half a second, repeatedly

const int ledPin = 9;//the number of the LED pin

void setup()

{

pinMode(ledPin,OUTPUT);//initialize the digital pin as an output

}

void loop()

{

digitalWrite(ledPin,HIGH);//turn the LED on

delay(700); // delay 0.7 seconds

digitalWrite(ledPin,LOW); //turn the LED off

delay(700); //delay 0.7 seconds

}

/*************************************************/

step three: upload the board

then the LED light will blink!!!


((you can add a case for your work to make it prettier))

Supplies

- Arduino board * 1

- USB cable * 1

- Resistor * 1

- LED * 1

- Breadboard * 1

- Jumper wires

Step 1:

Be the First to Share

    Recommendations

    • Space Contest

      Space Contest
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge
    • Back to School: Student Design Challenge

      Back to School: Student Design Challenge

    Comments

    0
    Elaina M
    Elaina M

    1 year ago

    Congrats on your first instructable. Would be great to see some pictures of your process:)