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