How to blink the onboard LED on the ESP32 Devkit V1

Posted

in

by

Tags:

The onboard LED is connected to GPIO 2

code

#define led 2
void setup() {
  // put your setup code here, to run once:
pinMode(2, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(led, 1);
delay(1000);
digitalWrite(led, 0);
delay(200);
}

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *