Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Do you really want to delete this prezi?
Neither you, nor the coeditors you shared it with will be able to recover it again.
Make your likes visible on Facebook?
You can change this under Settings & Account at any time.
Intro to Arduino
Transcript of Intro to Arduino
Talking to digital devices (digital ICs) Buttons with a ~ next to them support Pulse Width Modulation. This isn't truly analog output, but approximates it by turning the output on and off very quickly. Basic Example Analog Output The Arduino uses a 10-bit analog-to-digital converter (ADC) to measure analog values. This means that analog values between 0 and the reference voltage are reported as values between 0 and 1023. Analog to Digital Conversion 5v 0v 2-bit ADC What can we do with this? Arduino 101 Basics
Darkness Detector Boring Stats! 16 MHz - my 386 ran at this speed
14 digital I/O pins
6 PWM pins (of the above 14)
6 Analog input pins
32KB Flash (Program memory)
2KB SRAM (RAM)
1KB EEPROM ('disk') Links http://blog.workshop88.com/buy-arduinos/
http://www.trossenrobotics.com/c/arduino-robotics.aspx Sensor Indicator Display Controller Arduino 201 Types of Sensors
Pull-down and pull-up resistors
Fancy Stuff Sensors Arduino 202 Effectors Stuff that does stuff
Transistors and Relays
Switching high-power loads
Making things spin
Making things move Arduino 301 Registers
What registers are available
What do they do?
Changing multiple pin states
Relationship between interrupts and PWM
Using interrupts for event-driven programming Low-level programming Types of Sensors Digital Sensors
Tilt switch Analog Sensors
Piezo Fancy Sensors
Barometer Digital Sensors Can be approximated by a button. Don't always exhibit true on/off behavior. "Ringing" may occur, especially in mechanical sensors. Details The button connects the pin to +5v when it is depressed. The 220 ohm resistor connects the pin to GND. Because it is pulling the value of the pin to ground, it is a 'pull-down' resistor. How to fix this The problem with 'ringing' When a button or switch is closed, the detected voltage does not go from 0 to 5v immediately. This can be for mechanical or electrical reasons. For a detailed treatment of the problem, read this:
http://www.eng.utah.edu/~cs5780/debouncing.pdf Fixing it! Software Hardware A simple algorithm:
1. Check sensor
2. Wait longer than the switch could possible bounce
3. Check sensor again
4. If the readings agree, return that state Analog Sensors Manual Automatic Individual components
Presented as a variable resistance
Supply your own voltage divider
Easier to handle for beginners
Complete package (monolithic)
Presented as a variable voltage
Many are SMD
Easier to read TMP36 Fancy Sensors Usually require some kind of protocol (SPI, I2C, RS232)
A PC can be thought of as a complex sensor that speaks RS232 Shields Lots of complex functionality is packaged as Arduino 'shields'. Shields preserve the headers on the Arduino so you can still plug stuff into it, but may use some pins, making them unavailable for your application.