int ledPin[8]= {19,18,5,17,16,4,0,2};
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
for(int i=0;i<8;i++)
{
pinMode(ledPin[i], OUTPUT);
}
}
void loop() {
for(int i=0;i<8;i++)
{
digitalWrite(ledPin[i], LOW);
}
for(int i=0;i<4;i++)
{
digitalWrite(ledPin[3-i],HIGH);
digitalWrite(ledPin[4+i], HIGH);
delay(1000);
}
// put your main code here, to run repeatedly:
// this speeds up the simulation
}