Introduction: Arduino - Blinking LED
This is my first project with Arduino in instructables, but I create robots for few years with arduino.
The first I want I show you is The magic Hello World , that in electronics means Blinking LED!
Step 1: What Do You Need :
- Arduino - I have a diferent versions but I wanna use Arduino Duemilanove and iDuno.
- Led Resistor - you can calculate but I generally use 220ohm.
- Wire.
Step 2: Parts & Schema
The protoboard I use to be more easy the wired.
Insert led check out how I put the led in the schematic is the position,
Connect the resistor to the led, and connect pin 13 on your arduino to a spot on yhe breadboard.
Step 3: Software
For this Arduino create some small tutorial programs that just you can download into the microcontrollers.
- open the Files
- go to the Sketch Book
- go to examples
- then to Digital
- and open 'Blink'
when you done with this go to the upload button above the screen and select it when its done you see the led starts to blink.
Step 4: Code
This is basically the code:
First create a variable call led with a value 13 that is the pin in the arduino.
With pinMode we put our variable in OUTPUT mode , that means that the pin of arduino is waiting for a signal to pass to the led.
In the loop we change the signal from high to low, that permite to us see the blink!!!
int led = 13;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}