![Page 1: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/1.jpg)
Daniel Pickem and Rowland O’Flaherty12/04/2012
Mechatronics (ME 6405) Student Lecture On Arduinos
*Some slides courtesy of Eoin Brazil http://www.slideshare.net/eoinbrazil/imediaarduino08#btnNext
![Page 2: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/2.jpg)
Overview
• Hardware: What is Arduino?– Physical Computing– Versions and Capabilities– I/O and interfacing
• Software: Programming Arduinos– Sketches and their elements– Demo
![Page 3: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/3.jpg)
Physical Computing
“Physical Computing is about prototyping with electronics, turning sensors, actuators and microcontrollers into materials for designers and artists.”– Massimo Banzi, Tinker.it & Arduino Co-Founder
Daniel Pickem
![Page 4: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/4.jpg)
Daniel Pickem
More info at http://arduino.cc/en/Guide/Introduction
![Page 5: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/5.jpg)
What can you do with it?• The LED Cube – an 8x8x8 3D display
– Contains 512 LEDs– Controlled by one Arduino– Instructions to build it yourself freely available
• Animatronic Hand – 5 flex sensors– 5 servos– 1 Arduino– Wireless transmission using XBees
Rowland O’Flaherty
![Page 6: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/6.jpg)
Advantages of Arduinos• Inexpensive• Cross-platform• Simple, clear programming
environment • Open source and extensible software• Open source and extensible
hardware• Extensive project databases, Howtos
and guides online• Large number of hardware
extensions (shields) available online
Daniel Pickem
![Page 7: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/7.jpg)
Available Versions
Arduino Uno Arduino Mega
Arduino NanoArduino Due
Daniel Pickem
![Page 8: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/8.jpg)
ComparisonNano Uno Mega Due
Clock Speed 16 MHz 16 MHz 16 MHz 84 MHz
Digital I/O 14 14 54 54
Analog I/O 8 6 16 12
Flash Memory 16/32 KB 32 128 512
SRAM 1/2 KB 2 8 96
EEPROM 0.5/1 KB 1 4 0
Price 13 $1 15 $1 20 $1 45.70 $2
1 www.dealextreme.com2 www.mouser.com
![Page 9: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/9.jpg)
Daniel Pickem
![Page 10: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/10.jpg)
Daniel PickemDaniel Pickem
![Page 11: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/11.jpg)
Extending the Hardware
• Done with extension boards or shields• Plug into an Arduino directly (most are made for
Uno and Mega)• Extend capabilities of the microcontroller• Examples include– Ethernet shield– Wifi shield– GSM shield– Motor control shield
Daniel Pickem
![Page 12: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/12.jpg)
Interfacing with an Arduino
• Serial Rx, Tx Line (UART)• Serial Peripheral Interface (SPI)• Inter-Integrated Circuit (I2C)• External Interrupts (falling or rising edges)• Pulse Width Modulation (PWM)• Reset Pin
• More information available at: http://en.wikipedia.org/wiki/Arduino
Daniel Pickem
![Page 13: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/13.jpg)
Daniel Pickem
![Page 14: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/14.jpg)
Daniel Pickem
![Page 15: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/15.jpg)
Daniel Pickem
![Page 16: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/16.jpg)
Daniel Pickem
![Page 17: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/17.jpg)
Daniel Pickem
![Page 18: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/18.jpg)
Daniel Pickem
![Page 19: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/19.jpg)
Daniel Pickem
![Page 20: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/20.jpg)
Daniel Pickem
![Page 21: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/21.jpg)
Daniel Pickem and Rowland O’Flaherty12/04/2012
Mechatronics (ME 6405) Student Lecture On Arduinos
*Some slides courtesy of Eoin Brazil http://www.slideshare.net/eoinbrazil/imediaarduino08#btnNext
![Page 22: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/22.jpg)
Rowland O’Flaherty
![Page 23: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/23.jpg)
Rowland O’Flaherty
![Page 24: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/24.jpg)
Rowland O’Flaherty
![Page 25: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/25.jpg)
Rowland O’Flaherty
![Page 26: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/26.jpg)
Rowland O’Flaherty
![Page 27: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/27.jpg)
Rowland O’Flaherty
![Page 28: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/28.jpg)
Rowland O’Flaherty
![Page 29: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/29.jpg)
Rowland O’Flaherty
![Page 30: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/30.jpg)
Rowland O’Flaherty
![Page 31: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/31.jpg)
Extending the Software
• Libraries are used to extend software functionality (implemented in a superset of C/C++)
• Large variety of libraries available online as open source• Examples
– Communication: GSM, I2C, SPI libraries– Localization: GPS– Control: PWM, motor control libraries– Sensing: temperature, light, acceleration, ...
• Simple to implement your own and make available to IDE
Rowland O’Flaherty
![Page 32: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/32.jpg)
The Arduino IDE• Used to create sketches,
the Arduino term for a program.
• Allows programming the Arduino via USB.
• Allows reflashing of the firmware on the microcontroller.
• Runs on all major operating systems.
Rowland O’Flaherty
![Page 33: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/33.jpg)
How to program an Arduino1. Create your sketch in
the Arduino IDE 2. Compile and debug
your sketch 3. Select the correct serial
port for uploading4. Select the board
corresponding to your hardware
5. Upload the sketch to your Arduino
1.
![Page 34: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/34.jpg)
DEMO
![Page 35: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/35.jpg)
Distributors
• www.sparkfun.com– Lots and lots of shields, arduinos, and resources– Pricey, US-based
• www.dealextreme.com– Extremely cheap– Long shipping times, based in Hong Kong
• www.adafruit.com– US-based distributor– Nice selection of Arduino and related products– Reasonably priced
Rowland O’Flaherty
![Page 36: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/36.jpg)
References and Resources
• Manufacturer and Introduction– http://www.arduino.cc/en/
• Projects and Tutorials– http://www.bildr.org/
• Lectures– http://
www.slideshare.net/eoinbrazil/imediaarduino08
Rowland O’Flaherty
![Page 37: Daniel Pickem and Rowland O’Flaherty 12/04/2012](https://reader036.vdocuments.us/reader036/viewer/2022062310/56816136550346895dd092ac/html5/thumbnails/37.jpg)
Questions?