Arduino Workshop 4
Arduino Workshop 4
TO ARDUINO
ARDUINO
Arduino is the go-to gear for artists, hobbyists, students, and anyone with a
gadgetry dream.
With Arduino, you can control almost everything around you be it simple LED
or giant Robots.
2
ARDUINO
Basically Arduino is Microcontroller.
3
DIFFERENT TYPES OF
ARDUINO
Boarduino Kit
Arduino LilyPad
DIY Arduino
Arduino Uno
4
ARDUINO UNO
What does it have?
14 Digital In/Out pins (6 can be used as PWM)
6 Analog Inputs
A USB Connection
A Power Jack
Reset Button
On-board LED
SCL/SDA pins (Serial Clock/ Serial Data pins)
5
USB
PWR IN
(to Computer)
RESET
SCL\SDA
(I2C Bus)
POWER
5V / 3.3V /
GND Digital I\O
PWM(3, 5, 6, 9, 10,
11)
Analog
INPUTS
6
HOW TO CODE IN ARDUINO
You need to download Arduino IDE (Integrated Development Environment).
Arduino IDE is available for all Mac, Windows.and Linux.
7
HOW TO CODE IN ARDUINO
Once you have downloaded and
installed/extracted the folder,
you can directly run Arduino.exe,
which will take you to its IDE.
The IDE will look like the shown
screenshot.
8
PROGRAM YOUR ARDUINO
Before you start programming,
double check that correct board
is selected under Tools Board.
Now, you can start playing with
Arduino.
9
PROGRAM YOUR ARDUINO
The Arduino Uno can be
programmed with the Arduino
software. Select "Arduino Uno
from the Tools > Board menu
(according to the microcontroller
on your board).
All the peripheral connected
with Computers are using Serial
Port.
You can check port for Arduino
Uno in Device Manger.
10
INPUT VS OUTPUT
11
6 MAJOR CONCEPTS
digitalWrite()
analogWrite()
digitalRead()
If (statements) / Boolean
analogRead
Serial Communication
12
ANALOG VS DIGITAL
Microcontrollers are digital devices – ON or OFF. Also called – discrete.
5V 5V
0V 0V
13
ANALOG VS DIGITAL
Analog Sensors Digital Sensors
• Digital sensors are more
Sensors Variables straight forward than
Analog.
Mic soundVolume • No matter what the sensor
Photoresistor lightLevel there are only two settings:
On and Off
Potentiometer dialPosition
Temp Sensor temperature •Example, Push button, Switch
Flex Sensor bend
Accelerometer tilt/acceleration
14
SERIAL COMMUNICATION
“Serial” because data is broken into bits, each sent one after another in a
single wire.
Compiling turns your program into binary data (ones and zeros)
The two LEDs near the USB connector blink when data is transmitted.
RX blinks when the Arduino is receiving data.
TX blinks when the Arduino is transmitting data
15
LED BLINK PROGRAM
Upload
Compile
Status Message
16
THANK YOU