Arduino Tutorial: LED Sequential Control- Beginner Project

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today I'm going to show you guys a very simple Arduino project for beginners we're going to get three different LEDs to turn on and turn off in a simple sequence like you see here for this you're going to need an Arduino Uno or similar Arduino board a breadboard preferably with a positive and negative rail like this one for breadboard jumper wires a USB cable for the uno three LEDs of different colors here we're using blue red and green and three 220 ohm resistors now we're using 220 ohm resistors because they seem to work the best with the LEDs we have but you could use different resistors depending on your LEDs and your circuit I've put a link to an inexpensive Arduino kit that contains all these components in the description below so let's first set up the hardware the first step is to establish a common ground to do this use a jumper wire to connect the ground pin on the Arduino to the negative rail on the breadboard this allows all the LEDs to use the ground pin on the Arduino now we'll insert the resistors into the breadboard space the resistors out with one leg connected to the negative rail now it's time to insert the LEDs before inserting the LEDs it's important to note that the longer of the two leads on most through-hole LEDs is the positive lead connecting it the wrong way will cause the circuit to not work connect the negative lead of the LED to the horizontal rail on which the resistor is connected and connect the positive lead to an adjacent rail repeat this process for all three LEDs now it's time to complete the circuit we're going to use output ports 13 12 and 11 for the output signal connect the positive lead of the LED on the right to pin 13 the LED in the center to 12 and the LED on the left to pin 11 the circuit is now complete power on the Arduino board by connecting it to your computer using the USB cable the LEDs on the board turn on and the board powers up before we work on our sketch make sure to download the Arduino IDE for your specific operating system I'll leave a link to where you can download the software in the description below once you've downloaded and install the Arduino IDE go ahead and download the sketch to run this program using the link I've put in the description open the downloaded file the program first creates three variables led one led to and led three this allows us to change the output pins without having to modify the entire program the code in the setup part of the program tells the Arduino that pins 13 12 and 11 will be outputs the loop portion of the program is where the actual instructions live the first three digital write functions turn on one LED at a time with a 200 millisecond delay between each of them turning on the next three digital write functions turn off the LEDs with a 300 millisecond delay between each LED now you can change the delay between each LED to change the rhythm of the LEDs turning on and off now you're ready to upload the program to the board click on the tools tab of the arduino window make sure the arduino uno is selected as your board and make sure you select the comport your board is connected to most of the times there will be one comport available and that will be the one you need to select click on the upload button on the top left-hand corner of the screen to upload the program to the you know a green progress bar on the lower right hand corner will indicate upload progress and unless any errors appear in the black message bar at the bottom of the screen your board should now be running the program and the LEDs should be turning on and off like you can see here hope this tutorial was useful please hit like for more Arduino tutorials and subscribe to stay tuned thanks for watching
Info
Channel: Drone How
Views: 971,542
Rating: 4.8643522 out of 5
Keywords: arduino tutorial, arduino uno tutorial, arduino tutorial led, arduino tutorial for beginners, arduino tutorial led blink, arduino tutorial rgb led, arduino projects for beginners, arduino led projects for beginners, arduino led controller, arduino led controller tutorial, arduino led controller project
Id: e1FVSpkw6q4
Channel Id: undefined
Length: 3min 53sec (233 seconds)
Published: Wed Jul 08 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.