int red_LED=23;
int blue_LED=21;
int button=2;
void setup() {
// put your setup code here, to run once:
pinMode(red_LED, OUTPUT);
pinMode(blue_LED, OUTPUT);
pinMode(button, INPUT);
Serial.begin(115200);
Serial.println("Hello, ESP32!");
}
void loop() {
int value=digitalRead(button);
if (value==HIGH) {
digitalWrite(red_LED, HIGH);
// put your main code here, to run repeatedly:
delay(1000); // this speeds up the simulation
digitalWrite(red_LED, LOW);
delay(1000); // this speeds up the simulation
digitalWrite(21, HIGH);
// put your main code here, to run repeatedly:
delay(1000); // this speeds up the simulation
digitalWrite(blue_LED, LOW);
delay(1000); // this speeds up the simulation
}
}