Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const int ledPin = 2; // the number of the LED pin
const int threshold = 40; // the number of the LED pin
int ledState = LOW; // ledState used to set the LED
void setup() {
// put your setup code here, to run once:
//pinMode(ledPin, OUTPUT);
Serial.begin(115200);
touchAttachInterrupt(T0 , click , threshold );
}
void loop() {
Serial.println( touchRead(T0) );
delay(200);
}
void click () {
Serial.println("click!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.