Arduino workshop - hello real world
-
Upload
tom-luyten -
Category
Technology
-
view
497 -
download
3
Transcript of Arduino workshop - hello real world
![Page 1: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/1.jpg)
Hello real world!An introduction to physical computing
Tom Luyten & Gaston Jamin
![Page 2: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/2.jpg)
![Page 3: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/3.jpg)
• Blinks LEDS• Drives motors• Makes sound• Senses your presence• Detects gas• …
![Page 4: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/4.jpg)
= electronic prototypingtool for designers
![Page 5: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/5.jpg)
Anatomy of an interactive device
Source: Getting started with Arduino – Massimo Banzi
![Page 6: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/6.jpg)
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• ...
![Page 7: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/7.jpg)
Some possible hardware actuators:• Vibration motor• Regular motor• Sound• Muscle stimulus• Light• images• The web• Pump• Solenoid• Resistance wire• Relais• Radio frequency• …
![Page 8: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/8.jpg)
Boundaries are not definedExample: a tablet can be it’s own sensor and actuator, or can be paired/extended.
Arduinocomputer
tabletcloud
cell phone
Source: Getting started with Arduino – Massimo Banzi
![Page 9: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/9.jpg)
workshop
![Page 10: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/10.jpg)
USB connection
Power source(external)
Digital in/outputs + PWM*
5V + ground Analog in/outputs
processor
*PWMpulse width modulation : digital signal mimmicing an analogue oneused to fade lights, drive motors, create tone,…
![Page 11: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/11.jpg)
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
![Page 12: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/12.jpg)
Electronics 101
![Page 13: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/13.jpg)
• 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
![Page 14: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/14.jpg)
Get the software
• Current is a circle – starts at an i/o port, flows to GRND • Look it up, before you hook it uphttp://www.arduino.cc
![Page 15: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/15.jpg)
![Page 16: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/16.jpg)
![Page 17: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/17.jpg)
http://arduino.cc/en/Guide/Environment
![Page 18: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/18.jpg)
Standalone example
![Page 19: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/19.jpg)
Hello world! (=blink)
![Page 20: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/20.jpg)
Hello world! (=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}
File examples basics BLINK
![Page 21: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/21.jpg)
Hello world! (=blink)
Plug inPress play…HELLO WORLD!
![Page 22: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/22.jpg)
Image: adafruit learning systems
Producing sound
![Page 23: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/23.jpg)
Producing sound
Image: adafruit learning systems
![Page 24: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/24.jpg)
Producing sound
/*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(){}
http://learn.adafruit.com/adafruit-arduino-lesson-10-making-sounds/playing-a-scale
![Page 25: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/25.jpg)
Sensing distancehttp://arduino.cc/en/Tutorial/Ping?from=Tutorial.UltrasoundSensor
![Page 26: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/26.jpg)
Sensing distanceFile examples sensors PING
![Page 27: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/27.jpg)
Combination
![Page 28: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/28.jpg)
CombinationBlackboard
![Page 29: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/29.jpg)
Make Arduino talk to your computer
![Page 30: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/30.jpg)
Make Arduino talk to your computerhttp://www.processing.org
![Page 31: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/31.jpg)
Make Arduino talk to your computerhttp://www.processing.org
![Page 32: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/32.jpg)
Make Arduino talk to your computerhttp://www.processing.org
![Page 33: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/33.jpg)
Serial communication send
![Page 34: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/34.jpg)
Serial communication receive
![Page 35: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/35.jpg)
![Page 36: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/36.jpg)
This is just a start
There are tons of• Tutorials• Code snippets• Wiring diagramsAvailable to aid you in your experiments
See the Blackboard environment for links.
![Page 37: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/37.jpg)
Next week…
![Page 38: Arduino workshop - hello real world](https://reader030.fdocuments.net/reader030/viewer/2022012916/55d522d1bb61eb677d8b464a/html5/thumbnails/38.jpg)
Tinker, hack, break, rebuild, connect and explore!