void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(21,OUTPUT);
Serial.println("Hello, ESP32!");
}
void loop() {
if(Serial.available()>0){
char dato=Serial.read();
if(dato=='a'){
digitalWrite(21,HIGH);
}
else if(dato=='b'){
digitalWrite(21,LOW);
}
}
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
}