Upload
satoru-tokuhisa
View
43
Download
0
Embed Size (px)
Citation preview
Introduction to Multi sensory communication
AtsuroUeki Satoru Tokuhisa
2011.11.28
Parts
• Arduino UNO x1• USB cable x1• GROVE - Starter Bundle x 1pkg ※Please keep these parts until 12/20
Multi Sensory Communication 2
Download
• Arduino IDE– http://www.arduino.cc/en/Main/software
Multi Sensory Communication 3
Reference
• Language Reference– http://arduino.cc/en/Reference/HomePage
• Tutorial– http://arduino.cc/en/Tutorial/HomePage
Multi Sensory Communication 4
Schedule
• 11/28 – Introduction to Multi sensory communication
• 11/29 – Sensor & Actuator
• 12/05 – Prototyping
• 12/06 – Haptic Workshop01
• 12/19 – Haptic Workshop02
• 12/20 – Quick Presentation
Multi Sensory Communication 5
Presentation
• Prototyping– What is your Multi Sensory Communication System?
• Storytelling– What is your concept?
Multi Sensory Communication 6
Outline
• Introduction to Multi Sensory Communication– Definition– Example
• Basis of Arduino
Multi Sensory Communication 7
What is Multi Sensory Communication?
Multi Sensory Communication 8
Interaction
Multi Sensory Communication 9
Multi Senses
Multi Sensory Communicationhttp://mindchimes.net/wp-images/love-at-first-sight.jpg
10
Example
Multi Sensory Communication 11
Multi Senses
Multi Sensory Communicationhttp://s3.amazonaws.com/readers/2010/07/17/hearingkids_1.jpg
12
Example
Multi Sensory Communication 13
Example
Multi Sensory Communication 14
Multi Senses
Multi Sensory Communicationhttp://img4.blogs.yahoo.co.jp/ybi/1/77/ba/suiko_den_108/folder/161839/
img_161839_6357312_0?1318763981 15
Example
Multi Sensory Communication 16
Example
Multi Sensory Communication 17
Multi Senses
Multi Sensory Communicationhttp://purplepaperplanes.wordpress.com/2010/03/05/my-favorite-smells/
18
Multi Senses
Multi Sensory Communicationhttp://purplepaperplanes.wordpress.com/2010/03/05/my-favorite-smells/
19
Example
Multi Sensory Communication 20
Team Building
Multi Sensory Communication 21
What is Arduino?
Multi Sensory Communication 22
Arduino
• 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.
Multi Sensory Communication 23
Arduino
• Arduino Board– ATMega328– USB– Open Source
• Arduino IDE(Integrated Development Environment)– Windows, Linux, Mac OSX– Opern Source– Based on Processing
• Arudino Programming language– Based on Wiring
Multi Sensory Communication 24
Arduino Board / UNO
Multi Sensory Communication
Analog Input x 6
Digital Input and Output x 14
3.3VGround
Ground
5V
Power Indicator
External Power
25
Install(Windows)
• Connect Arduino to PC with USB cable.
Multi Sensory Communication 26
Install(Windows)
• Connect Arduino to PC with USB cable.
Multi Sensory Communication 27
Install(Windows)
• Connect Arduino to PC with USB cable.
Multi Sensory Communication 28
Install(Mac OS X)
• Open FTDIUSBSerialDriver_10_4_10_5_10_6.mpkg
Multi Sensory Communication 29
Arduino IDE
Multi Sensory Communication
Tab
Toolbar
Text Editor
Message Area
Text Console
30
Arduino IDE
Multi Sensory Communication
Verify
Checks your code for errors.
Stop
Stops the serial monitor, or unhighlight other buttons. .
Creates a new sketch..
New
Presents a menu of all the sketches in your sketchbook. Clicking one will open it within the current window.
Open
Upload
Compiles your code and uploads it to the Arduino I/O board.
Serial Monitor
Opens the serial monitor.
Save
Saves your sketch.
31
Setup(Windows)
• Tools-> Board-> Arduino UNO• Tools->Serial Port COMxx※Please Check Device Manager[XP] My Computer->Right Click->Property->Hardware-> Device Manager[Vista/Win7] Start->Control Panel->System & Security-> Device Manager
32Multi Sensory Communication
Setup(Mac OS X)
• Tools-> Board-> Arduino UNO• Tools->Serial Port -> /dev/tty.usbserial-xxxxxxxx
Multi Sensory Communication 33
Hello (Physical) World!
Multi Sensory Communication 34
Test
1. Open a example file.Menu->File->Examples->Basics->Blink
Multi Sensory Communication 35
Hello World!
void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); }
void loop() { digitalWrite(13, HIGH); // set the LED on delay(1000); // wait for a second digitalWrite(13, LOW); // set the LED off delay(1000); // wait for a second}
36Multi Sensory Communication
Change the Blink Interval
void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); }
void loop() { digitalWrite(13, HIGH); // set the LED on delay(100); // wait for a second digitalWrite(13, LOW); // set the LED off delay(100); // wait for a second}
37Multi Sensory Communication
Change the Blink Ratio
void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); }
void loop() { digitalWrite(13, HIGH); // set the LED on delay(5); // wait for a second digitalWrite(13, LOW); // set the LED off delay(5); // wait for a second}
38Multi Sensory Communication
Change the Blink Ratio
void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); }
void loop() { digitalWrite(13, HIGH); // set the LED on delay(1); // wait for a second digitalWrite(13, LOW); // set the LED off delay(9); // wait for a second}
39Multi Sensory Communication
Change the Blink Ratio
void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); }
void loop() { digitalWrite(13, HIGH); // set the LED on delay(9); // wait for a second digitalWrite(13, LOW); // set the LED off delay(1); // wait for a second}
40Multi Sensory Communication
PWM
• PWM(Pulse Width Modulation)
D = τ/ TD : duty cycleτ: pulseT : transition
Multi Sensory Communication
ex: 0.25(D) = 1(τ)/4(T)
Pulse
time
41
PWM
Multi Sensory Communication
Analog Input x 6
Digital Input and Output x 14
3.3VGround
Ground
5V
Power Indicator
External Power
42
Practice
void setup() { pinMode(11, OUTPUT); // 3, 5, 6, 9, 10, 11,}
void loop() { analogWrite(11, 255); // 0-255}
• analogWrite• http://arduino.cc/en/Reference/AnalogWrite
43Multi Sensory Communication
Basis of Electrical Circuit
Multi Sensory Communication 44
Basic Knowledge
• Voltage – The difference in electric potential between
two points.– Unit symbol V(Volt)
• Electric current – A flow of electric charge through a medium.– Unit symbol A(Ampere)
• Resistance – The opposition to the passage of an electric
current.– Unit symbol Ω(Ohm)
Multi Sensory Communication 45
Voltage
Multi Sensory Communication
Electric potential A
Electric potential B
The difference in electric potential
Ground(GND)
46
Ohm’s law
Multi Sensory Communication
Same Pressure
lessmoreSame
amount
LowPressure
HighPressure
47
What is servo motor?
Multi Sensory Communication 48http://www.seattlerobotics.org/guide/servos.html
Movement
Multi Sensory Communication 49
20ms Pulse
1.25/20ms
1.5/20ms
1.75/20ms
Neutral
-90 degrees
+90 degrees
Arduino Digital Pin
Control using servo library
Methods see… http://www.arduino.cc/en/Reference/Servo– attach(pin/number)
• Attach the Servo variable to a pin– write(angle/degrees 0 - 180)– writeMicroseconds(time/micro seconds1250 - 1750)– read(pin/number)
• The angle of the servo, from 0 to 180 degrees. – attached()
• Use as ServoObject.attached() returns true/false – detach()
• Use as ServoObject.detach() detach pin from servo
Multi Sensory Communication 50
Tutrial
• File > Examples > Servo > Sweep
Multi Sensory Communication 51http://arduino.cc/en/Tutorial/Sweep
orange
brownred
Points
#include <Servo.h> //a maximum of eight servo objects can be created
Servo myservo; // create servo object to control a servo int pos = 0; // variable to store the servo position void setup() { myservo.attach(9); // attaches the servo on pin 9 to the servo object } void loop() { for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees { // in steps of 1 degree myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position } for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees { myservo.write(pos); // tell servo to go to position in variable 'pos' delay(15); // waits 15ms for the servo to reach the position } }
Multi Sensory Communication 52