Arduino Workshop-LED Flashers

Now we are going to the first four projects. These projects all use LED lights in various ways. You will learn about controlling outputs from the Arduino 

Parts Required


You can read this book and it will help you to learn more About Arduino Beginning Arduino

Circuit Diagram



Arduino Workshop-LED Flashers

First, make sure your Arduino is powered off by unplugging it from the USB cable. Next, take your breadboard, LED, resistor, and wires, and connect everything up as in  Circuit Diagram,

Make sure that your LED is connected the right way. Make sure the anode (positive) leg of the LED (usually the leg with the longer lead) is connected to digital pin 7. Make sure the anode of the LED (usually the lead with the longer leg) is connected to the resistor, and the cathode (usually the short leg) to ground. LEDs only light up when the anode is at a more positive voltage than the cathode. If you connect it backward, it won’t light, but won’t damage the LED either in this circuit.

When you are sure that everything is connected up correctly, power up your Arduino and connect the USB cable

Code


Now press the Verify button at the top of the IDE to make sure there are no errors in your code. If this is successful, you can now click the Upload button to upload the code to your Arduino. If you have done everything correctly, you should now see the LED on the breadboard flashing on and off every second. Now let’s take a look at the code and the hardware and find out how they both work


 

No comments

Theme images by Dizzo. Powered by Blogger.