Skip to content

Commit cea41d9

Browse files
ionciubotarume-no-dev
authored andcommitted
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
1 parent e62ecb3 commit cea41d9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// ESP32 Touch Test
2+
// Just test touch pin - Touch0 is T0 which is on GPIO 4.
3+
4+
void setup()
5+
{
6+
Serial.begin(115200);
7+
delay(1000); // give me time to bring up serial monitor
8+
Serial.println("ESP32 Touch Test");
9+
}
10+
11+
void loop()
12+
{
13+
Serial.println(touchRead(T0)); // get value using T0
14+
delay(1000);
15+
}

0 commit comments

Comments
 (0)