From cea41d965ade046ac814cd784517bf2edbe23445 Mon Sep 17 00:00:00 2001 From: Ion Date: Tue, 7 Feb 2017 03:42:43 +0200 Subject: [PATCH] Add Touchread example (#175) * Add Touchread example * Rename libraries/ESP32/examples/Touch/TouchRead.ino to libraries/ESP32/examples/Touch/TouchRead/TouchRead.ino * Update TouchRead.ino --- .../ESP32/examples/Touch/TouchRead/TouchRead.ino | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 libraries/ESP32/examples/Touch/TouchRead/TouchRead.ino diff --git a/libraries/ESP32/examples/Touch/TouchRead/TouchRead.ino b/libraries/ESP32/examples/Touch/TouchRead/TouchRead.ino new file mode 100644 index 00000000..e217fc19 --- /dev/null +++ b/libraries/ESP32/examples/Touch/TouchRead/TouchRead.ino @@ -0,0 +1,15 @@ +// ESP32 Touch Test +// Just test touch pin - Touch0 is T0 which is on GPIO 4. + +void setup() +{ + Serial.begin(115200); + delay(1000); // give me time to bring up serial monitor + Serial.println("ESP32 Touch Test"); +} + +void loop() +{ + Serial.println(touchRead(T0)); // get value using T0 + delay(1000); +}