INTRODUCTION
TO ARDUINO
FEATURES ARDUINO
An opensource electronics platform that allows you to create and control
wide range of electronic project:-
E.g.: Temperature Sensing, Building Robots, Home/Industrial
Automation, Prototyping etc.
Arduino is open source which means Hardware & Software designs are freely
available.
It consists of both hardware an software components.
2
DIFFERENT TYPES OF
ARDUINO
DIY Arduino
Arduino Nano Arduino Uno
Arduino Mega 2560
3
COMPONENTS OF
ARDUINO UNO
4
ANALOG VS DIGITAL
5V 5V
0V 0V
Microcontrollers are digital devices – ON or OFF. Also called – discrete.
Eg: Controlling led or Relay
Analog signals are anything that can be a full range of values.
Eg: Temperature Sensor or Humidity sensor
5
INPUT VS OUTPUT
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.
error & status messages
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.
Pune Makers ( http://www.meetup.com/Pune-Makers/ ) 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.
Pune Makers ( http://www.meetup.com/Pune-Makers/ ) 10
6 MAJOR CONCEPTS
digitalWrite()
analogWrite()
digitalRead()
If (statements) / Boolean
analogRead
Serial Communication
Pune Makers ( http://www.meetup.com/Pune-Makers/ ) 11
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
12
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)
Uploading sends the bits through USB cable to the Arduino
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
Pune Makers ( http://www.meetup.com/Pune-Makers/ ) 13
LET’S START
CODING
PROJECT #1 LED BLINK
digitalWrite()
15
Upload
Compile
Status Message
16
THANK YOU
Pune Makers
16th May 2015