Velostat touch sensor

These were the initial readings that I got. I went back and added more copper tape then I also realized I had connected the LED the wrong way (messed up which one goes to ground) and reconnected it. I didn’t have to hold it down, the tape was doing a good job of that lol. I think this worked quite well.

I think this was a little less sensitive than the one with the copper wire as the fabric had a tendency to shift a little. At first, when I did it, I had the crocodile clips connected to both the conductive and non-conductive material which made it not work very well, this was quickly corrected.

code

void setup() {
//start serial connection
Serial.begin(9600);
//configure pin 2 as an input and enable the internal pull-up
resistor
pinMode(2, INPUT_PULLUP);
pinMode(13, OUTPUT);
}
void loop() {
//read the pushbutton value into a variable
int sensorVal = digitalRead(2);
//print out the value of the pushbutton
Serial.println(sensorVal);
// Keep in mind the pull-up means the pushbutton's logic is
inverted. It goes
// HIGH when it's open, and LOW when it's pressed. Turn on
pin 13 when the
// button's pressed, and off when it's not:
if (sensorVal == HIGH) {
digitalWrite(13, LOW);
} else {
digitalWrite(13, HIGH)

Leave a Reply

Your email address will not be published. Required fields are marked *