ARDUINO (blink)
Ohm’s Law V = IR
What is Arduino?
ARDUINOS http://arduino.cc/en/Main/Products
Basic Hardware Introduction
Digital Output x 12(14) Analogue Output x 6 (LED, Servo…) USB Port
4
5 7 Reset POWER
1
ATmage328
6 2
3.3V/5V Power(+) Ground(-)
Micro Controller
3 Analog in = Input x6 (Sensor, potentiometer… )
USB Messages 5
OUTPUT
4
7 *POWER input
1
ATmage328
6 2
POWER Output
Reset BRAIN 3
Input
http://www.arduino.cc/
Choose the Operation Platform You Use to get the Application and INSTALL!!!
If you have any troubles with running the application Follow the steps
Instead of the latest version Find the old one
http://arduino.cc/en/Main/OldSoftwareReleases
Find what suits you, in my case: “arduino-1.0.5-r2-windows”
If you can Run the IDE You are good
http://arduino.cc/en/Guide/MacOSX
Come here, if you want to Know the clear process.
Otherwise, Here comes the annoying part DRIVER
Doing this while You plug in your Arduino
Window’s + Arduino Uno
Window’s + Arduino Duemilanove
Mac + Arduino Uno
Mac + Arduino Duemilanove
This Probably take Half an hour‌
Open the Application (IDE)
Looks like Processing?!
The syntax is almost the same So let’s start with Processing for warm-up
The Major things are: Variables If else For-loop
Back to the Arduino
=setup
=draw
*Plug in your Arduino
Important step 1: Choose the right BOARD
*Plug in your Arduino
Normally it’s COM3
Important step 1: Choose the right PORT
Upload & Blink
Open the example file: File > Examples > 1.Basics > Blink.
Compile
Upload
Compile
Compiling‌
Done Compiling
*Make sure you choose the right board & port before uploading‌
Upload
Uploading‌
Done uploading
Blink!!!
BreadBoard
13+ 220立
Ground-
LED: Long > + Short > --
Back to Code
/* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
Pin No.?
Set Pin as output
High = on Low = off
Try to make it blink one by one!!!