Week 3

Programming the 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 s omething online.
You can tell your board what to do by sending a set of instructions to the microcontroller on the board. To do so you use the Arduino programming language (based on Wiring), and the Arduino Software (IDE), based on Processing.
First you have to install the Software Arduino. You can find the link for the download here.
When you open the software you can go to file/Examples.
As you can see Arduino has already example codes, which you can use.
We used the example Blink for the LED. You can find it when you go to F ile/Examples/01.Basics/Blink.
When you open the example you have to change the pinMode to the number of pin you are going to use.
My LED had the positive in pin 13 and the negative in ground (GND), so I changed LED_BUITIN to 13.
When you want to change the speed of your blinking LED you can change the DELAY.
Verify you code first before you connect your Arduino with your computer to make shure there aren’t any problems!
Connect you Arduino with through a USB cable to your computer and check the settings of the board and port.
When you’re done you can upload your code and your LED starts to blink.