Final Personal Project
Tools: Arduino, TouchDesigner
Description: The project connect and send or receive information using Arduino, in order to create generative and procedural real time graphics in TouchDesigner. The visual part acts like a simulation - the size and distance of the Orange on the screen (digital part) will will change along with the change of the distance of the Orange (physical) next to the sensor.
Step1: Set up Arduino
Details: I used an Ultrasonic Sensor connected with Arduino Uno to detect the distance.
Step2: Code the Arduino
int TRIG = 3;
int ECHO = 2;
int DURATION;
int DISTANCE;
void setup() {
// ULTRASONIC SENSOR
pinMode(TRIG, OUTPUT);
pinMode(ECHO, INPUT);
// SERIAL
Serial.begin(9600);
}
void loop() {
digitalWrite(TRIG, HIGH);
delay(1);
digitalWrite(TRIG, LOW);
DURATION = pulseIn(ECHO, HIGH);
DISTANCE = DURATION / 58.2;
if(DISTANCE > 0 && DISTANCE < 50) {
Serial.println(DISTANCE);
delay(100);
}
}
Step3: Set up TouchDesigner
Details:
Added serial to read data from the Arduino (Change the port to the correct one)
Added maths - one to control the size transformation and the other to control the position
Adjust the visuals to look like an Orange