Why Arduino?
It is Open Source, both in terms of Hardware and Software.
It is cheap(1300 Original, 800 - Clone), the hardware can be built from
components or a prefab board can be purchased online.
It can communicate with a computer via serial connection over USB.
It can be powered from USB or standalone DC power.
It can work with both Digital and Analog electronic signals. Sensors and
Actuators.
You can make cool stuff! Some people are even making simple robots, and
we all know robots are just cool.
Overview of
The Programming Language
Let's get it started, hah!
Let's get it started in here, yeah
Lose control, all body, all soul
Don't move too fast, people just take it slow
Don't get ahead, just jump into it!
Programming an Arduino
Write program
Compile(Check for errors)
Reset board
Upload to board
Declare variables at
top
Initialize
setup() run once at
beginning, set pins
Running
loop() run
repeatedly, after
setup()
14 Digital I/O (pins 0 - 13)
6 Analog In (pins 0 - 5)
6 Analog Out (pins 3,5,6,9,10,11)
Functions for digital i/o
pinMode()
digitalWrite()
digitalRead()
Demonstration
Start up the Arduino software and
open up the Blink sketch.
the long leg (+) pushed into pin 13 and the short leg (-) in the adjacent ground
pin (GND). Pin 13 is special, in the sense that it has a built in resistor to
correctly control the voltage going into a testing LED just like this.