Intro to Arduino and Flashing LEDs

In this exercise we were programing our Arduino for the first time to make some LEDs flash.

What is an Arduino?

Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs – light on a sensor, a finger on a button, or a Twitter message – and turn it into an output – activating a motor, turning on an LED, publishing something online.

First steps:

  1. Connect the Arduino to the computer using an USB lead
  2. Open the Arduino environment what you can download from the official Arduino website.
  3. make sure that the Arduino is connected to the correct COM port of your computer:  go to the Arduino environment and left click Tools, Left click serial port and select the port that your Arduino is connected to.
  4. open your first Arduino Sketch:  Select: File\Examples\Basics\Blink
  5. Upload the sketch to your Arduino using the upload button (right arrow) You should now see the yellow LED on the board flashing regularly. This LED is also connected to pin 13.
  1. Connect an LED to pin 13 and ground (Make sure that the short leg goes to ground)
  2. Edit the program to cause the LED to flash:
    • Faster
    • Slower
    • Unevenly

  1. Edit the program to cause pin 11 to be the output instead of pin 13
  2. Edit the program to make three or more LEDs flash in an attractive pattern.

 

Print Friendly, PDF & Email