YourESP32 Sketch Template TouchSensitivityTest

From ArduinoInfo
Jump to navigation Jump to search

/* YourESP32 Example: Sketch Template: Test touch sensitivity
 *  SEE: https://ESP32Info.Info
 - WHAT IT DOES
 - SEE the comments after "//" on each line below
 Just test touch pin - Touch0 is T0 (Check your module pinout)
 Find a median value to use later as a threshold value
 - CONNECTIONS:
   - 
   - 
 - V1.00 10/02/2018
   Questions: terry@yourduino.com */

/*-----( Import needed libraries )-----*/
/*-----( Declare Constants and Pin Numbers )-----*/
/*-----( Declare objects )-----*/
/*-----( Declare Variables )-----*/


void setup()   /****** SETUP: RUNS ONCE ******/
{
  Serial.begin(115200);
  delay(1000); // time to bring up serial monitor
  Serial.println("ESP32 Touch Test");

}//--(end setup )---


void loop()   /****** LOOP: RUNS CONSTANTLY ******/
{
  Serial.println(touchRead(T0));  // get value using T0
  delay(1000);

}//--(end main loop )---

/*-----( Declare User-written Functions )-----*/
//NONE yet

//*********( THE END )***********