The document provides an overview of the Arduino open-source electronics prototyping platform. It discusses that Arduino is intended for artists, designers, hobbyists to create interactive objects. It describes the main features of Arduino boards including the microcontroller, inputs/outputs, and programming. The document outlines how to program Arduino using its IDE and C-like language, and covers uploading code, using libraries, and interfacing with common devices.
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
arduino
1. Meeting Arduino
by Miguel Sánchez
Polytechnic University of Valencia, Spain
February 2008
2. Outline
(1)Introduction
(2)What is Arduino?
(3)Arduino main features
(4)Programming Arduino
(5)Q & A
3. Design of embedded systems
Love it or hate it
Many details (software, hardware, I/O, pcb ...)
Not easy to practice with:
expensive
errors maybe be destructive (more expensive)
many tools are proprietary (compilers, pcb CAD...)
Development kits are cool but ... expensive
4. What is Arduino?
From http://www.arduino.cc
Arduino is an opensource electronics
prototyping platform based on flexible, easyto
use hardware and software. It's intended for artists,
designers, hobbyists, and anyone interested in
creating interactive objects or environments.
5. Opensource hardware?
It seems an odd concept
Like Opensource software, designers are
making all the many details of the design
public, including:
schematics & pcb
development environment (multi platform)
boot loader code
7. Arduino main features
13 digital outputs (6 PWM)
USB
RESET
incircuit
power
system
selection a
programming
918 VDC
power outputs 6 analog inputs
8. Hardware details
Built around ATMEL ATmega168 micro
controller
16KByte flash / 1KByte RAM / 0.5KByte EEPROM
Clock 0 – 20Mhz
10 bit ADC, PWM,
capture counters,
USART, I2C, SPI,
programmable watchdog, etc
USB to serial converter
Can be USBpowered
9. There are other formats
Older versions use ATmega8
There are small versions without comms
Older versions used RS232 instead of USB
Program upload required user to press RESET
not anymore!
10. Who did this and why?
Arduino is an open
hardware and
open/free software for
Physical Computing.
Physical ... what?
11. Artists platform
Maybe the intended use is for making artistic
interactive installations
It can be used by students and hobbyists too!
You can buy a board on eBay or from a local
supplier for less than 20 EUR
add a USB cable and you can start playing
12. What about the software?
Arduino platform is completed by a software
development environment
It's a Clike language (that it is actually parsed
to generate standard Ccode)
It is great thing that there is a GNU C compiler
for ATMEL microcontollers
They made it easy: compile, upload, run
13. Arduino IDE
Written in Java
It works on Windows,
Linux, OSX, ...
It includes a mini
terminal for debugging
Freely available
14. Arduino Language
It is based on Wiring language
developed by Hernando Barragán (Universidad de
los Andes, Colombia)
The Arduino IDE is based on Processing IDE
Ben Fry and Casey Rias (MIT Media Lab)
Both projects are also opensource ones
Several libraries are part of the language (serial
I/O, stepper motors, basic I/O, delays, etc)
15. Program structure
Instead of a main function you have two
mandatory functions: setup and loop
void setup() performs the initial setup of
variables and hardware
void loop() contains code that will be run as an
endless loop
Think of main() { setup(); while(1) loop(); }
16. Language reference
Similar to C syntax
Variable types:
* boolean
Serial communication
* char
Basic input/output: * byte
* int
digitalRead, * unsigned int
digitalWrite * long
* unsigned long
analogRead, * float
analogWrite * double
* string
... * array
17. gccavr compiler
Code is translated to C code and later compiled
Library AVRLibc is used
Binary can be uploaded through the serial
connection because Arduino chip does have a
bootloader code
Bootloader receives the code and writes it to
flash memory
18. Boot sequence
After a RESET:
Bootloader code checks if an upload is being done
over the serial connection.
If not, it jumps to the beginning of the user code
User code upload does not destroy the
bootloader
Bootloader cannot be programmed using the
serial, though
19. Programming the bootloader
Arduino commercial kits do
include the bootloader code
in the microcontroller
To change it, you need to use
the InCircuit Serial
Programming (ICSP pins)
ICSP adapters for serial or
parallel ports can be built
cheaply
20. Uploading new code
In older versions, users have to press RESET
button on Arduino
Newer versions (diecimila) make a RESET with
the DTR signal of the serial port (USB2serial)
RESET is needed because user code was
running and we want the bootloader to take
control now so upload can happen
21. Arduino shields
You can stack other boards on top of Arduino to
add additional hardware to your project like:
a protoboard
a ZigBee wireless interface
a DC motor controller
a stepper motor controller
your own shield
23. External power supply
You can use a wall
wart from 918 VDC
USB cannot power
beyond 500 mA load
24. Programming Arduino
The Arduino IDE is freely available from
Arduino webpage.
Arduino uses FTDI USB to serial chip.
Drivers for that chip are available for many
platforms.
You do not need to install additional drivers for
Linux, Windows or Apple OS X.
25. Hello World!
Compile Upload Activate Terminal
As Arduino does not a
have a screen, we can
use the serial port to
print out
Serial.begin(speed)
Serial.println(”...”)
Terminal Area
27. Analog input
Let's read from input 0
and print to the serial
Can we call this a PC
based instrument?
28. PWM output
Not all the digital tcycle
outputs allow PWM
Pin 13 does not work,
pin 11,10,9,6,5,3 does
ton
analogWrite function
takes care of this t on
Vout = ×Vcc
You may call it analog t cycle
output
29. Libraries
There are certain classes available for driving
common devices like:
stepper motors
serial EEPROM memory
RC servos
LCD panels
Software serial port
etc
30. Prototype platform
Once you've got your system running you may:
completely remove the bootloader
design a new PCB with all the needed elements
remove USB communication if yo do not need it
Or you can leave it this way
it may be your cheapest choice
31. Other references
http://www.freeduino.org
it contains a list of more than 400 references
among them a Programming Tutorial
And there are many variations: