Anoush Arshakyan
Published

The Hands Can Tell A Lot

Interactive scenography: flex-sensor glove links movement to mechanisms with biomaterials, animating living-like, responsive forms.

AdvancedFull instructions provided20 hours48
The Hands Can Tell A Lot

Things used in this project

Hardware components

XIAO ESP32C3
Seeed Studio XIAO ESP32C3
×2
SG90 Micro-servo motor
SG90 Micro-servo motor
×2
Through Hole Resistor, 6.8 kohm
Through Hole Resistor, 6.8 kohm
×4

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Xiao ESP32C3 pinout

Code

DIY flex sensors Sender Code

Arduino
The self-made flex sensors are connected to Xiao ESP32C3, to analog pins GPIO2, GPIO3, GPIO4 and digital pin GPIO6.
// Analog Flex Sensor Pins
const int ANALOG_FLEX1 = A0;  // Flex sensor 1 (analog)
const int ANALOG_FLEX2 = A1;  // Flex sensor 2 (analog)
const int ANALOG_FLEX3 = A2;  // Flex sensor 3 (analog)

// Digital Flex Sensor Pin
const int DIGITAL_FLEX = 6;   // D4 = GPIO6
const int LED_PIN = 10;       // Feedback LED

// Calibration (adjust these based on your sensor readings)
const int BENT_THRESHOLD = 150;  // Analog threshold for bent state

void setup() {
  Serial.begin(115200);
  while (!Serial); // Wait for serial connection
  
  // Initialize pins
  pinMode(DIGITAL_FLEX, INPUT);
  pinMode(LED_PIN, OUTPUT);
  
  Serial.println("Flex Sensor Monitoring System");
  Serial.println("----------------------------");
}

void loop() {
  // Read analog sensors
  int flex1Value = analogRead(ANALOG_FLEX1);
  int flex2Value = analogRead(ANALOG_FLEX2);
  int flex3Value = analogRead(ANALOG_FLEX3);
  
  // Read digital sensor
  int flex4State = digitalRead(DIGITAL_FLEX);
  digitalWrite(LED_PIN, flex4State); // LED mirrors D4 state

  // Print all values to Serial Monitor
  Serial.print("A0: ");
  printAnalogState(flex1Value);
  
  Serial.print(" | A1: ");
  printAnalogState(flex2Value);
  
  Serial.print(" | A2: ");
  printAnalogState(flex3Value);
  
  Serial.print(" | D4: ");
  Serial.println(flex4State ? "BENT (HIGH)" : "STRAIGHT (LOW)");

  delay(200); // Update rate
}

// Helper function to print analog values with state
void printAnalogState(int value) {
  Serial.print(value);
  Serial.print(value > BENT_THRESHOLD ? "(Bent)" : "(Straight)");
}

Credits

Anoush Arshakyan
1 project • 3 followers
Leading Fabricademy in Armenia, I fuse sensors, machines, and materials to turn imagination into new ways of making.

Comments