Arduino workshop - hello real world

1,183 views

Published on

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

Arduino workshop - hello real world

  1. 1. Hello real world! An introduction to physical computing Tom Luyten & Gaston Jamin
  2. 2. • • • • • • Blinks LEDS Drives motors Makes sound Senses your presence Detects gas …
  3. 3. = electronic prototyping tool for designers
  4. 4. Source: Getting started with Arduino – Massimo Banzi Anatomy of an interactive device
  5. 5. Some possible hardware sensors: • potentiometer • Sliding potentiometer • Switch • Tiltswitch • Accelerometer • Proximity sensor • Photocell • Flexometer • Camera • WII • Kinect • Force sensing sensor • Temperature sensor • Gas sensor • Barometric sensor • Humidity sensor • RFID reader • GPS • Reed switch • Gyroscope • ...
  6. 6. Some possible hardware actuators: • Vibration motor • Regular motor • Sound • Muscle stimulus • Light • images • The web • Pump • Solenoid • Resistance wire • Relais • Radio frequency • …
  7. 7. Arduino computer cell phone cloud tablet Source: Getting started with Arduino – Massimo Banzi Boundaries are not defined Example: a tablet can be it’s own sensor and actuator, or can be paired/extended.
  8. 8. workshop
  9. 9. Digital in/outputs + PWM* USB connection processor Power source (external) 5V + ground *PWM pulse width modulation : digital signal mimmicing an analogue one used to fade lights, drive motors, create tone,… Analog in/outputs
  10. 10. The arduino way “the Arduino philosophy is based on making designs rather than talking about them. It is a constant search for faster and more powerful ways to build better prototypes. We have explored many prototyping techniques and developed ways of thinking with our hands.: • Prototyping • • • • • Tinkering Patching Circuit bending Hacking collaboration
  11. 11. Electronics 101
  12. 12. • Current is a circle – starts at an i/o port, flows to GRND • Use red for positive wires (from output) • Use black for negative wires (to GRND) • Look it up, before you hook it up
  13. 13. Get the software • Current is a circle – starts at an i/o port, flows to GRND • Look it up,http://www.arduino.cc before you hook it up
  14. 14. http://arduino.cc/en/Gui de/Environment
  15. 15. Standalone example
  16. 16. Hello world! (=blink)
  17. 17. Hello world! (=blink) File  examples  basics  BLINK /* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }
  18. 18. Hello world! (=blink) Plug in Press play… HELLO WORLD!
  19. 19. Producing sound Image: adafruit learning systems
  20. 20. Producing sound Image: adafruit learning systems
  21. 21. Producing sound http://learn.adafruit.com/adafruit-arduino-lesson-10-making-sounds/playing-a-scale /* Adafruit Arduino - Lesson 10. Simple Sounds */ int speakerPin = 12; int numTones = 10; int tones[] = {261, 277, 294, 311, 330, 349, 370, 392, 415, 440}; // mid C C# D D# E F F# G G# A void setup() { for (int i = 0; i < numTones; i++) { tone(speakerPin, tones[i]); delay(500); } noTone(speakerPin); } void loop() { }
  22. 22. Sensing distance http://arduino.cc/en/Tutorial/Ping?from=Tutorial.UltrasoundSensor
  23. 23. Sensing distance File  examples  sensors  PING
  24. 24. Combination
  25. 25. Combination Blackboard
  26. 26. Make Arduino talk to your computer
  27. 27. Make Arduino talk to your computer http://www.processing.org
  28. 28. Make Arduino talk to your computer http://www.processing.org
  29. 29. Make Arduino talk to your computer http://www.processing.org
  30. 30. Serial communication send
  31. 31. Serial communication receive
  32. 32. This is just a start There are tons of • Tutorials • Code snippets • Wiring diagrams Available to aid you in your experiments See the Blackboard environment for links.
  33. 33. Next week…
  34. 34. Tinker, hack, break, rebuild, connect and explore!

×