Skip to content

Instantly share code, notes, and snippets.

@michaelsarduino
Created October 27, 2015 10:55
Show Gist options
  • Save michaelsarduino/d15b9573b107b6d1b201 to your computer and use it in GitHub Desktop.
Save michaelsarduino/d15b9573b107b6d1b201 to your computer and use it in GitHub Desktop.
#include <CapacitiveSensor.h>
CapacitiveSensor cs_4_2 = CapacitiveSensor(4,2); //Touch Sensor mit Pin 4 als Sender und Pin 2 als Empfaenger
void setup()
{
cs_4_2.set_CS_AutocaL_Millis(0xFFFFFFFF);
Serial.begin(9600);
}
void loop()
{
long start = millis();
long status1 = cs_4_2.capacitiveSensor(30);
Serial.println(status1); //Senden der Auswertung
delay(1000); //kurze Pause
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment