I modified the code from this tutorial: instructables.com/id/TfCD-Touch-Slide-Bar/ and this tutorial: https://create.arduino.cc/projecthub/millerman4487/arduino-paper-controller-buttons-slider-d2ae64?ref=tag&ref_id=capacitive&offset=4 for my copper tape slider. Here is my code:
#include <CapacitiveSensor.h>
CapacitiveSensor slider = CapacitiveSensor(10, 2);
void setup()
{
Serial.begin(9600);
}
void loop()
{
long total = slider.capacitiveSensor(10000);
Serial.println(total);
delay(100);
}
It can detect my touch properly—but as I run my finger across the strip, the reading average remains the same. How can I resolve this? Thanks!
