2. Arduino …is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. http://arduino.cc
3. Physical Computing …is an approach to learning how humans communicate through computers that starts by considering how humans express themselves physically. - Tom Igoe http://www.tigoe.net/pcomp/blog/archives/notes/000169.shtml
4.
5. Embedded Systems …are computer systems designed to perform one or a few dedicated functions. They are embedded as part of a complete device often including hardware and mechanical parts. In contrast, a general-purpose computer, such as a personal computer, is designed to be flexible and to meet a wide range of an end-user's needs. Embedded systems control many of the common devices in use today.. - Smart folks at Wikipedia http://en.wikipedia.org/wiki/Embedded_systems
6. Why Arduino? Inexpensive No need for external programmers, compiler licenses etc. Simple, clear programming environment All done in a simple IDE, no command line voodoo Cross-platform Works uniformly across Windows, Linux, MacOS Open Source! Both software and hardwre
7.
8.
9. Hardware Atmel Microcontroller ATmega328 (Duemilanove) / ATmega1280(Mega) ATmega8/ATmega168 on older versions ATmega644 for Sanguino Serial Bootloader STK500 compatible Support Circuitry Reset, Voltage Regulator, etc… USB/Serial Connectivity
10. Anatomy of an Arduino Board digital pins USB to serial converter microcontroller (the brain!) power circuitry (voltage regulator and the clever power source selection bit) analog pins power pins
33. The BreadBoard! * Drawn using the new Fritzing ( http://fritzing.org )
34. Arduino Software Based on avr-gcctoolchain and the Processing IDE. Code editor, programming tools and serial terminal all in one place.
35. Arduino Language Simplified C/C++ Based on the Wiring Project http://wiring.org.co Peripheral Libraries LCD, sensors, I2C, etc
36. Useful functions pinMode() – set a pin as input or output digitalWrite() – set a digital pin high/low digitalRead() – read a digital pin’s state analogRead() – read an analog pin analogWrite() – write an “analog” PWM value delay() – wait an amount of time millis() – get the current time http://arduino.cc/en/Reference/Extended
47. LED Resistor Calculation Let’s assume we have a 9V source… R = V / I R = (9-3.4) / (20*10-3) R = 280 Ω Nearest standard value is 330 Ω List of standard resistor values: http://www.logwell.com/tech/components/resistor_values.html
48. Ohm’s Law V = Voltage I = Current R = Resistance V I R V = Current * Resistance I = Voltage / Resistance R = Voltage / Current
59. Example Project: Thermometer A temperature sensor is connected to an analog input on the Arduino Arduino periodically reports the temperature back to PC PC uses this data to plot graphs etc.
60. Thermometer: Arduino Code intsensorPin = 0; // the analog pin that the sensor is connected to void setup(){ Serial.begin(9600); } void loop(){ //getting the voltage reading from the temperature sensor int reading = analogRead(sensorPin); // converting that reading to voltage, for 3.3v arduino use 3.3 float voltage = reading * 5.0 / 1024; // print out the voltage Serial.print(voltage); Serial.println(" volts"); // now print out the temperature floattemperatureC = (voltage - 0.5) * 100; // converting from 10 mV per degree with 500 mV offset // to degrees ((voltage - 500mV) times 100) Serial.print(temperatureC); Serial.println(" degress C"); delay(1000); // wait a second } From Ladyada’s TMP36 Tutorial - http://www.ladyada.net/learn/sensors/tmp36.html
61. Thermometer: PC Side Read the incoming data every X seconds (cron) Collect and plot temperature graphs (rrdtool) Example: thermostat-graph http://www.anders.com/projects/thermostat-graph/ Not an Arduino project but easily hackable!