Capacitive Sensing

Albert Hodo
Oct 13, 2022

--

Albert Hodo. Tangible UI, Fall 2022

Prompt:Make a capacitive sensor using a different material, not aluminum foil. Hint: try things that are conductive, like metal or things containing water like fruits and vegetables. Take pictures!

Components Used

  1. Bread Board
  2. Esp 32
  3. Jump Wires
  4. 1 10K Resister
  5. 1 LED

Process

I took input from the capacitive touch input from the lead from the pencil marking and used the input to turn an LED on and off.

Code

bool lightOn=false;
void setup()
{
Serial.begin(115200);
delay(1000); // give me time to bring up serial monitor
// Serial.println("ESP32 Touch Test");
// pinMode(34, OUTPUT);//buzzer
pinMode(13, OUTPUT);//led indicator when singing a note
}
void loop()
{
Serial.println(touchRead(4));
if(touchRead(4)<45){
lightOn=!lightOn;
Serial.print(lightOn);
}

Serial.print("light: ");
if (lightOn){
digitalWrite(13,HIGH);
}else{
digitalWrite(13,LOW);}
// }
delay(1000);
}

Demo

--

--

Albert Hodo
Albert Hodo

Written by Albert Hodo

I’m a first year MDes student at UC Berkeley. A master’s jointly run by the College of Engineering and Environmental Design. I love outer space and tangible UI.

No responses yet