Maryam ShojaeiHeba ElidrisiBeste Cebeci
Published

Sensescape

Interactive sensory installation exploring discomfort transforming into self-created comfort through touch, sound, and real-time interaction

IntermediateFull instructions providedOver 1 day71
Sensescape

Things used in this project

Hardware components

card board
×1
Arduino UNO
Arduino UNO
×1
aluminum foil
×1
algae bio material
×1
sand
×1
rocks and stones
×1
grass and flowers
×1

Software apps and online services

Arduino IDE
Arduino IDE
intouch designer

Hand tools and fabrication machines

Laser cutter (generic)
Laser cutter (generic)
wood saw

Story

Read more

Schematics

Touchdesigner system(failed)

Touchdesigner System (fixed)

CCL Badge

Code

Touch

Arduino
// ESP32 Capacitive Touch -> TouchDesigner via WiFi (UDP)

#include <WiFi.h>
#include <WiFiUdp.h>

// =========================
// WIFI SETTINGS
// =========================
const char* ssid = "Iaac-Wifi";
const char* password = "...";

// =========================
// TOUCHDESIGNER SETTINGS
// =========================
const char* tdIP = "172.16.20.197";
const int udpPort = 7000;

// =========================
// TOUCH SENSOR SETTINGS
// =========================
const int touchPin4 = 4;
const int touchPin5 = 5;
const int touchPin6 = 6;
const int touchPin7 = 7;

// UDP object
WiFiUDP udp;

void setup() {

  Serial.begin(115200);
  delay(1000);

  Serial.println("Starting ESP32 Touch Sender");

  // =========================
  // CONNECT TO WIFI
  // =========================
  WiFi.begin(ssid, password);

  Serial.print("Connecting to WiFi");

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("");
  Serial.println("WiFi Connected!");
  Serial.print("ESP32 IP Address: ");
  Serial.println(WiFi.localIP());

  // Start UDP
  udp.begin(udpPort);

  Serial.println("UDP Ready");
}

void loop() {

  // Read capacitive touch value
  int touchValuePin4 = touchRead(touchPin4);
  int touchValuePin5 = touchRead(touchPin5);
  int touchValuePin6 = touchRead(touchPin6);
  int touchValuePin7 = touchRead(touchPin7);

  // =========================
  // SEND UDP DATA
  // =========================

  // Create message
  // Format: rawValue,touchState
  String message = String(touchValuePin4) + "," + String(touchValuePin5)+ "," + String(touchValuePin6)+ "," + String(touchValuePin7);

  // Send packet
  udp.beginPacket(tdIP, udpPort);
  udp.print(message);
  udp.endPacket();

  // Debug output
  Serial.print("Sent: ");
  Serial.println(message);

  delay(200);
}

Credits

Maryam Shojaei
3 projects • 1 follower
Heba Elidrisi
3 projects • 1 follower
Beste Cebeci
3 projects • 1 follower

Comments