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:
- Connect the Arduino to the computer using an USB lead
- Open the Arduino environment what you can download from the official Arduino website.
- 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.
- open your first Arduino Sketch: Select: File\Examples\Basics\Blink
- 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.
- Connect an LED to pin 13 and ground (Make sure that the short leg goes to ground)
- Edit the program to cause the LED to flash:
- Faster
- Slower
- Unevenly
- Edit the program to cause pin 11 to be the output instead of pin 13
- Edit the program to make three or more LEDs flash in an attractive pattern.