Arduino Fever – PHYSICAL COMPUTING

Embed Size (px)

DESCRIPTION

The Arduino project was created to provide access to the essence of digital technologies and has contributed a remarkable set of open-source tools, ideal to conduct courses in electronics prototyping. Today, more than 20 universities are using Arduino in their programs and engineering classes, several open source communities have welcomed Arduino as their platform for interfacing the physical world, and the Arduino project has expanded into secondary education in schools allover Europe. This talk provides a hands-on introduction to the Arduino platform. We focus on sensors and actuators and take a look at how a computer converts inputs (in the form of sound, light, motion, and other forms) into changing electronic signals that it can interpret. No previous knowledge in electronics is required. However, participants should bring an open mind for a challenging time with a hand full of bytes.

Citation preview

  • 1. Arduino Fever - PHYSICAL COMPUTINGWolf Paulus . com Wolf Paulus

2. Arduino955 - 1015Taking advantage of strongdisagreements inside Germany, theItalian feudatories rebelled and, in1002, elected Arduino, Marquess ofIvrea, king of Italy.He distinguished himself particularlybecause of his ghts against theBishop of Ivrea. 3. Arduino Fever 4. disruptive innovation 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 5. disruptive innovation 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 6. Arduino is an open-source computingplatform based on a simple board, and adevelopment environment for writing software. 2007 Wolf Paulus 6SoCal Code Camp Jan. 27, 2007 7. 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 8. 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 9. The 1st Arduino was produced inJan. 2005 by David Cuartiellesand Massimo Banzi, teachers ofPhysical Computing and InteractionDesign at the Interaction DesignInstitute, Milan Italy. 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 10. Interaction Design design of any interactive experience One area of Interaction Design is Physical Computing, dealing with electronic prototyping and turning micro-controllers, sensors, actuators etc. into materials used by artists and designers. 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 11. Physical Computing is anapproach to learning howhumans communicate throughcomputers that starts byconsidering how humansexpress themselves physically Physical Computing 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 12. Physical Computing 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 13. cheap, about US$ 30based on a simple I/O boardopen-source physical computing platformstandalone interactive object or connected to a computerArduino Boards can be assembled or purchased pre-assembled 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 14. 2007 Wolf Paulus 15 SoCal Code Camp Jan. 27, 2007 15. May 2005: Wiring 1.0 (ALPHA) is released. Aug 2005: Arduino boards are assembled in Europe Aug 2005: Tom Igoe (NYU) assembles a small number of Arduino boards in the US. Oct 2005: Board are printed in batches of 1000 Mar 2006: Arduino feat. in OReilly Make Magazine Nov 2006: Arduino feat. at ARTECH 2006 2007 Wolf Paulus16 SoCal Code Camp Jan. 27, 2007 16. Tom Igoe, ITP NYUassembles Arduino Boards, August 2005 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 17. really easy to programJava-like languageallows quickly creation of prototypescheap hardware makes mistakes tolerable 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 18. Classic engineering relies on a strict process for getting from A to B, while the arduino way is based on maybe getting lost in the way and nding C instead ... tinkering 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 19. 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 20. circuit board IDEIntegrated Development Environment sample code 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 21. 2007 Wolf Paulus 22 SoCal Code Camp Jan. 27, 2007 22. 16 MHz-Crystal Power-LED Reset-Buttondigital I/OATmega8MicroanalogTest LED inputTX/RX USB LEDsFTDI USBPowerPower Regulator 23. 16 MHz 8 KByte Flash RAM(1K taken by the boot loader) 1 KByte RAMe.g. for auto/local variables and stack 14 digital Input/Output PortsATmega8 2007 Wolf PaulusSoCal Code Camp Jan. 27, 2007 24. USB 2.0 compatible Transmit and receive LEDdrive signals 256 Byte receive,128 Byte transmit buffer Data transfer rate from300 bit/s to 3 Mb/sSingle chip USB to async.serial data transfer interface 2007 Wolf Paulus 25 SoCal Code Camp Jan. 27, 2007 25. 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 26. 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 27. 1KOhm Resistor 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 28. hello world - the blinking LED int ledPin = 13; void setup() { pinMode(ledPin, OUTPUT); } void loop() { digitalWrite(ledPin, HIGH); delay(1000); digitalWrite(ledPin, LOW); delay(1000); }hello world 2007 Wolf PaulusSoCal Code Camp Jan. 27, 2007 29. 14 digital IO (pins 0..13) can be set as input or output ports. int ledPin = 13; void setup() { pinMode(ledPin, OUTPUT); }Digital I/O Ports 2007 Wolf PaulusSoCal Code Camp Jan. 27, 2007 30. Solderless Breadboards 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 31. Digital I/O Ports 32. int analogPin = 3;int val = 0;void setup() {..}void loop() {val=analogRead(analogPin);..} 6 analog input (pins 0..5), which take analog values (like voltage readings) and convert them into integer values 0..1023Analog In 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 33. Analog Input 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 34. 3 analog output (pins 9,10,11), reassigned digital pins take analog values 0..255 (0V..5V)int analogPin = 3;int ledPin = 9;void setup() {pinMode(ledPin, OUTPUT);}void loop() {val=analogRead(analogPin);analogWrite(ledPin, val/4);}Analog Out 2007 Wolf PaulusSoCal Code Camp Jan. 27, 2007 35. Analog Input 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 36. Sensors 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 37. Temperature Probe Digital Themometer Temperature/Humidity SensorTemperature Sensors 2007 Wolf PaulusSoCal Code Camp Jan. 27, 2007 38. IR Sensor detects changing patterns of passive infrared to sense motion from up to 20 feet away!Passive Infra-Red Sensor 2007 Wolf PaulusSoCal Code Camp Jan. 27, 2007 39. 3-Axis Accelerometer can sense gravitational (g) force of 3g on three axes (X, Y, and Z).Accelerometer 2007 Wolf PaulusSoCal Code Camp Jan. 27, 2007 40. Color Sensor Light to Frequency Converter Touch Sensor Sensors 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 41. The module provides current time, date, latitude, longitude, altitude, speed and travel direction/ headingGPS Receiver Module 2007 Wolf PaulusSoCal Code Camp Jan. 27, 2007 42. Ultrasonic Sensor 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 43. 2007 Wolf Paulus 44 SoCal Code Camp Jan. 27, 2007 44. Arduino Board Life Cycle 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 45. Demo 1. Blinky - for Hello World of Embedded Computing 2. Anlog In - Photo Resistors and Infrared Detectors 3. Interrupt - LOW, CHANGE, RISING, and FALLING 4. Ultrasonic Sensor - pulseIn 5. bonacci - Recursive Programming on Arduino ? 2007 Wolf Paulus 46 SoCal Code Camp Jan. 27, 2007 46. hello world - blinking LEDint ledPin = 13;void setup() {pinMode(ledPin, OUTPUT);}void loop() {digitalWrite(ledPin, HIGH);delay(1000);digitalWrite(ledPin, LOW);delay(1000);}t sl id e on nexm inhello world 2007 Wolf Paulus zo oSoCal Code Camp Jan. 27, 2007 47. int p = 13;// LED connected to digital pin 13void setup() {pinMode( p, OUTPUT ); // dene digital pin as output}void loop() {digitalWrite( p, HIGH );// sets the LED ondelay( 1000 );// waits for one seconddigitalWrite( p, LOW );// sets the LED offdelay( 1000 );// waits for one second} Blinky - Hello World 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 48. Infrared Detectors 2007 Wolf Paulus SoCal Code Camp Jan. 27, 2007 49. /* * Code Camp Example: IR on/off switch for external LED */int ledPin = 13; // LED connected to digital pin 13int irPin = 1; // IR receiver connected to analog pin 1int threshold = 512; // thresholdboolean b = true;void setup() {pinMode(ledPin, OUTPUT); // sets the digital pin 13 as outputSerial.begin(9600);}void irReader() {int val = analogRead(irPin);if (val