Professional Documents
Culture Documents
António Moreira
Summary
2
Arduino presentation
Shields and Add-ons
Using the Arduino
How to program
IDE
Arduino Language
Arduino Library's
Examples
What is Arduino ?
3
Arduino Nano
LilyPad
Arduino Mini
Arduino Shields ?
Shields are boards that can be plugged on top of the
Arduino PCB extending its capabilities.
Easy to mount and cheap to produce.
Examples:
Bluetooth, Wifi, GPS, Xbee, Ethernet, CANBus
Lcd, MP3, Sdcard, RFID, 6Dof IMU
Motor/Servo Control, Extended IO’s
Shield Examples
8
Applications ?
9
PC data acquisition
Accelerometer, temperature, light, touch…
External control, motors, Lcd’s…
Projects
Interactive walls
Robots
Home Automation
How to start using ?
10
Hardware required:
1 PC (windows, mac or linux)
1 Arduino (uno, mega, lilypad)
1 USB cable
Software required:
Install
Arduino IDE
www.arduino.cc
Arduino IDE
11
Upload !
Arduino Language
15
… … …
Arduino Language
16
setup()
function is called when a sketch starts.
Initialize mode of pin 13.
loop()
The loop() function performs a continuous loop, allowing
the program to change the output pin value and wait
some time.
Example 1 Description
21
pinMode(13,OUTPUT)
Define the pin 13 direction as output
delay(1000)
Stop the execution during 1000 milliseconds
ADC
SAR (successive
approximation register)
𝑉𝑟𝑒𝑓
𝑅𝑒𝑠𝑜𝑙𝑢𝑡𝑖𝑜𝑛 =
1024
TX
SERIAL RX
ARDUINO
Filter/
Buffer • Digital Sensors
o RS232
o I2C/SPI
o OneWire
o CANbus
Example 3 - Accelerometer
26
• An accelerometer is an electromechanical
device that will measure acceleration
forces.
• These forces may be static, like the
constant force of gravity pulling at your
feet, or they could be dynamic - caused
by moving or vibrating the accelerometer.
Example 3
27
µC
1-Wire® bus
1º Extract “DallasTemperature_360.zip”
• Output
• Analog (10mV/inch)
• PWM
• RS232
Example 5
34
Example 6 - LCD
35
Affordable !
Easy to use and to program !
vs AVR C or ASM
Shields for extended features !
Many examples, projects and forums !
Many Libraries !
www.arduino.cc
arduino.cc/forum/
arduino.cc/playground/
shieldlist.org/
www.sparkfun.com/
www.adafruit.com
Thanks !