fix: update touch sensor connection logic to correctly identify connection status
This commit is contained in:
		| @@ -60,15 +60,10 @@ void setup() { | |||||||
|  |  | ||||||
|   // Touch Sensor |   // Touch Sensor | ||||||
|   pinMode(TTP223_PIN, INPUT_PULLUP); |   pinMode(TTP223_PIN, INPUT_PULLUP); | ||||||
|   if (digitalRead(TTP223_PIN) == HIGH)  |   if (digitalRead(TTP223_PIN) == LOW)  | ||||||
|   { |  | ||||||
|     Serial.println("Touch Sensor is not connected"); |  | ||||||
|     touchSensorConnected = false; |  | ||||||
|   }  |  | ||||||
|   else  |  | ||||||
|   { |   { | ||||||
|     Serial.println("Touch Sensor is connected"); |     Serial.println("Touch Sensor is connected"); | ||||||
|     touchSensorConnected |     touchSensorConnected = true; | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user