As computing becomes more ubiquitous in our objects, designers need to be more aware of how to design meaningful interactions into electronically enhanced objects. At the University of Washington, a class of junior Interaction Design majors is exploring this question. These pages chronicle their efforts.

Thursday, December 12, 2019

Echo - Kevin Oh, Verli Chen, Jena McWhirter

Echo

Kevin Oh, Verli Chen, Jena McWhirter

Video:

Overview:
Our final project explores the potential for a bench to act as an anonymous messenger for people on the UW campus. The Echo bench senses when someone sits down using an ultrasonic distance sensor placed near the top of one of the bench legs. This sensor triggers the built-in speaker to play a 10 second recording left by the previous person who used the bench. After hearing the message, each person is able to press the built-in LED push-button and record a message they’d like to share for the next person.

The Echo bench is placed near a walkway so that people could sit, reflect, and leave their message in a serendipitous moment. The hustle bustle of the sidewalk also creates a lively, stimulating atmosphere for people to view while sitting on the bench. The interaction is impactful because it provides an opportunity for students to reach out to the world; to express concerns and hope within the safety of anonymity. The recording action is only constrained by the 10 second timer, so people can express themself freely; whether that be voice, song, or other forms of audio. Although, there is a potential for harmful messages, we hope that Echo would be used as a tool for self reflection, encouragement and community building.

This experience of contemplating and responding is defined as Echo: a messenger who reflects and reverberates the introspective expressions of humanity.

Components:
• Arduino Uno
• Ikea LACK Coffee Table
• ISD1820 Voice Recorder & Mic
• HC-SR04 Ultrasonic sensor (distance)
• Adafruit Arcade Button with LED - 30mm Translucent Clear
• CSS-66668N Top Port speaker

Input:
Ultrasonic sensor detects when someone is less than 50 cm from it
• Button senses when someone pushes it
• Voice Recorder records audio in the environment for 10 seconds when button is pushed

Output:
• LED lights up when button is pushed
• Speaker outputs 10 second audio recording when ultrasonic sensor is triggered

Links:
• https://create.arduino.cc/projecthub/gadgetprogrammers/
diy-auto-voice-record-and-playback-7a47d7
• https://www.arduino.cc/en/Tutorial/Debounce
• https://www.baldengineer.com/use-millis-with-buttons-to-delay-events.html
• https://create.arduino.cc/projecthub/Isaac100/getting-started-
with-the-hc-sr04-ultrasonic-sensor-036380

Code:
/* * Ultrasonic Sensor HC-SR04 and Arduino Tutorial * * by Dejan Nedelkovski, * www.HowToMechatronics.com * | */ // defines pins numbers const int trigPin = 9; const int echoPin = 10; // defines variables long duration; int distance; #define REC 2 // pin 2 is used for recording #define PLAY_E 3 // pin 3 is used for playback-edge trigger #define FT 5 // pin 5 is used for feed through // and will NOT record #define playTime 10000 // playback time 10 seconds #define recordTime 10000 // recording time 10 seconds const byte BUTTON=12; // our button pin const byte LED=13; // LED (built-in on Uno) unsigned long buttonPushedMillis; // when button was released unsigned long ledTurnedOnAt; // when led was turned on unsigned long turnOnDelay = 10; // wait to turn on LED unsigned long turnOffDelay = 10000; // turn off LED after this time bool ledReady = false; // flag for when button is let go bool ledState = false; // for LED is on or not. * | void setup() { pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output pinMode(echoPin, INPUT); // Sets the echoPin as an Input Serial.begin(9600); // Starts the serial communication pinMode(REC,OUTPUT);// set the REC pin as output pinMode(PLAY_E,OUTPUT);// set the PLAY_e pin as output pinMode(FT,OUTPUT);// set the FT pin as output Serial.begin(9600);// set up Serial monitor pinMode(BUTTON, INPUT_PULLUP); pinMode(LED, OUTPUT); digitalWrite(LED, LOW); } * | void loop() { //FOR PLAYBACK and DISTANCE SENSOR // Clears the trigPin digitalWrite(trigPin, LOW); delayMicroseconds(2); // Sets the trigPin on HIGH state for 10 micro seconds digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); // Reads the echoPin, returns the sound wave travel time in microseconds duration = pulseIn(echoPin, HIGH); // Calculating the distance distance= duration*0.034/2; // Prints the distance on the Serial Monitor Serial.print("Distance: "); Serial.println(distance); if( distance < 35 ){ Serial.println("Playbak Started"); digitalWrite(PLAY_E, HIGH); delay(50); digitalWrite(PLAY_E, LOW); delay(playTime); Serial.println("Playbak Ended"); } Serial.println("###Serial Monitor Exited"); * | //FOR BUTTON AND LIGHT // get the time at the start of this loop() unsigned long currentMillis = millis(); // check the button if (digitalRead(BUTTON) == LOW) { // update the time when button was pushed buttonPushedMillis = currentMillis; ledReady = true; } // make sure this code isn't checked until after button has been let go if (ledReady) { //this is typical millis code here: if ((unsigned long)(currentMillis - buttonPushedMillis) >= turnOnDelay) { // okay, enough time has passed since the button was let go. digitalWrite(LED, HIGH); // setup our next "state" digitalWrite(REC, HIGH); ledState = true; // save when the LED turned on ledTurnedOnAt = currentMillis; // wait for next button press ledReady = false; } } * | // see if we are watching for the time to turn off LED if (ledState) { // okay, led on, check for now long if ((unsigned long)(currentMillis - ledTurnedOnAt) >= turnOffDelay) { ledState = false; digitalWrite(LED, LOW); digitalWrite(REC, LOW); } } }
END CODE.
THANK YOU ALL FOR A GREAT CLASS!
- KEVIN, VERLI, AND JENA










No comments:

Post a Comment