void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(17, OUTPUT);
pinMode(27, INPUT);
}
void loop () {
int swt=digitalRead(27);
Serial.println(swt);
if(swt ==1)
{
digitalWrite(17, HIGH);
}
else
digitalWrite(17, LOW);
}