Flashing LED

by Kevin4444 in Circuits > Arduino

41 Views, 0 Favorites, 0 Comments

Flashing LED

IMG_2153.jpg

This project is about making an LED flash with the use of coding and an Arduino

(This project is for my Mech 1 class taught by Mr. Sweet and using a SIK guide by SparkFun)

https://cdn.sparkfun.com/datasheets/Kits/SFE03-0012-SIK.Guide-300dpi-01.pdf

Supplies

IMG_2155.jpg

1x Arduino

2x Wires

1x Resistor

1x LED

1x Computer with Arduino IDE

1x USB Type B

Setting Up

IMG_2159.jpg
IMG_2160.jpg

1st: Plug your USB Type B cord into your laptop or computer then open up Arduino IDE.

2nd: Plug one of your wires into the 5V slot. And then plug in your last wire into Pin 13.

3rd: Put one end of the resistor into the negative column then put the other end on on the breadboard

4th: Plug in your LED next to the resistor (Make sure you put the negative end next to the resistor! The resistors connected to the negative charge!)

5th: Use the wire in 5V and put it in next to the positive end of the LED

6th Use the wire in Pin 13 and put it in the negative column of the breadboard

7th: Plug in the USB Type B into the Arduino and the LED will power up (Look at second picture above for reference)

Coding

Capture.PNG

1st: Head to the Arduino IDE window

2nd: Type in pinMode(13,OUTPUT) under void setup

3rd: Go under void loop and type in digitalWrite(13,HIGH); then hit the Enter button and type in delay(1000);hb

4th: Repeat the 3rd instructions and make sure to type in digitalWrite(13,LOW); instead of digitalWrite(13,HIGH);

5th: Press the verify button and then the upload button afterwards, then bam! The LED will start flashing!

(If verifying or uploading fails, make sure you have your letters capitalized, in lowercase, and include parenthesis and brackets! Look at the picture above for help)

Downloads