Sensory Extension
When one is engaged in a form of reality it is hard to smoothly transfer from that space to another. The sensory extension is a system that can bridge that gap with minimal interference. The garment mounted ultrasonic sensor reads the physical world while you can engage in digital ones. Whether a human approaches you or you approach the wall, the sensor will gently pulse, keeping you aware of your surroundings.
3D Renderings and Illustrations by Dylan North
Components List
Feather 32u BlueFruit LE
HR-SR04 Ultrasonic Sensor
Litium Ion Battery 1200mAh
8mm Micro Vibrator Motor
Small SPDT Slide Switch
Code Source
#include <Adafruit_CircuitPlayground.h>
/*
VR and Reality Bridge
Andrew Atkin
GDES-3015-001 Wearable Computing
OCAD University
Created on March 16th 2017
Based on:
Carolina Uscategui - https://gist.github.com/CarolinaUscategui/6d99255a2ce6d6c9d69153587622021d
GDES 3015 - Wearable Computing
---------------------------------------------
---------------------------------------------
https://www.arduino.cc/en/Tutorial/Ping
I put all the ultrasonic distance code into a single function called ultrasoundPing so I can call it more easily in my main for loop
By calling ultrasoundPing at the beginning of every loop I no longer need to wait for an entire LED sequence to fire before the delay
changes. Instead, it is more responsive now and the delay can change within a sequence.
*/
// defines pins numbers
const int trigPin = 12; //part of the sensor
const int echoPin = 13;//part of sensor
const int vibratePin = 11;//
// defines variables
long duration;
int distance;
int safetyDistance;
void setup() {
//
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output; the sound and light
pinMode(echoPin, INPUT); // Sets the echoPin as an Input; measurement
pinMode(vibratePin, OUTPUT);//Vibration Motor
Serial.begin(9600); // Starts the serial communication 9.6
}
void loop() {
// Clears the trigPin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Sets the trigPin on HIGH state for 10 micro seconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10); //literally no delay too keep it constant
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;
//the speed of sound is 340m/s , but the echo pin needs to bouse off that sound wave so /2 double the distace
safetyDistance = distance;
if (safetyDistance <= 5) {
digitalWrite(vibratePin, HIGH);//if there is motion produce a output (turn on)
}
else {
digitalWrite(vibratePin, LOW); // or else of nothing is occuring be at a state of nothing
}
// Prints the distance on the Serial Monitor
Serial.print("Distance: ");
Serial.println(distance);
}