int button=23;
int val;
void setup() {
pinMode(button,INPUT);
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
val=digitalRead(button);
if(val==HIGH)
{
Serial.println("Hello, ESP32!");
}
else
{
Serial.println("not activated");
}
// put your main code here, to run repeatedly:
delay(1000); // this speeds up the simulation
}