Blinking an LED With ESP32
by TechMartian in Circuits > Arduino
181392 Views, 19 Favorites, 0 Comments
Blinking an LED With ESP32
![t.jpg](/proxy/?url=https://content.instructables.com/F1D/SDIQ/J5V3S6OY/F1DSDIQJ5V3S6OY.jpg&filename=t.jpg)
The ESP32 is an advanced IoT microcontroller board possessing WiFi and Bluetooth Low Energy capabilities, as well as limited compatibility with the Arduino Core. This is the first module in a series of tutorials regarding the use of the ESP32 Development Board, from it's equivalent Arduino projects to advanced IoT projects.
The 'Blinking an LED' project uses the ESP32 Development Board will be used to blink an LED at a specific timed interval, infinitely. It is the essential fundamental tutorial for any microcontroller board, as it is the hardware equivalent of the classic "Hello World" tutorial!!!
Tools and Materials
![2016-08-01 17.48.39.jpg](/proxy/?url=https://content.instructables.com/FCL/8TEC/J5V3S1X6/FCL8TECJ5V3S1X6.jpg&filename=2016-08-01 17.48.39.jpg)
![2016-08-01 18.32.35.jpg](/proxy/?url=https://content.instructables.com/FHQ/GS4H/J5V3S11E/FHQGS4HJ5V3S11E.jpg&filename=2016-08-01 18.32.35.jpg)
![2016-08-01 18.35.33.jpg](/proxy/?url=https://content.instructables.com/FH4/KTDF/J5V3S11G/FH4KTDFJ5V3S11G.jpg&filename=2016-08-01 18.35.33.jpg)
![2016-08-01 18.33.58.jpg](/proxy/?url=https://content.instructables.com/FOT/LL3M/J5V3S11Q/FOTLL3MJ5V3S11Q.jpg&filename=2016-08-01 18.33.58.jpg)
![2016-08-01 18.33.47.jpg](/proxy/?url=https://content.instructables.com/FKS/POTD/J5V3S11R/FKSPOTDJ5V3S11R.jpg&filename=2016-08-01 18.33.47.jpg)
![2016-08-01 21.13.39.jpg](/proxy/?url=https://content.instructables.com/FO1/RJUW/J5V3S10K/FO1RJUWJ5V3S10K.jpg&filename=2016-08-01 21.13.39.jpg)
- ESP32 Development Board
- 5mm LED
- 100Ω Resistor
- 3 pieces of jumper wires
- Breadboard
Circuitry
![Screen Shot 2017-08-02 at 9.22.37 PM.png](/proxy/?url=https://content.instructables.com/FRS/W78P/J5V3S0F1/FRSW78PJ5V3S0F1.png&filename=Screen Shot 2017-08-02 at 9.22.37 PM.png)
![Screen Shot 2017-08-02 at 9.24.26 PM.png](/proxy/?url=https://content.instructables.com/FAA/SC8M/J5V3S0F2/FAASC8MJ5V3S0F2.png&filename=Screen Shot 2017-08-02 at 9.24.26 PM.png)
![2016-08-01 18.00.31.jpg](/proxy/?url=https://content.instructables.com/FTU/IPLW/J5V3S23P/FTUIPLWJ5V3S23P.jpg&filename=2016-08-01 18.00.31.jpg)
- Connect the negative pin (cathode) of the LED, indicated as the flat edge of the LED to ground, shown as the blue wire.
- Connect the positive pin (anode) of the LED, indicated as the rounded edge of the LED to a 100Ω resistor.
- Connect the free end of the resistor to pin D5 on the ESP32, shown as the red wire.
Coding
/*** * LED Blinking * Code Written by TechMartian */
const int ledPin = 5;
void setup() { // setup pin 5 as a digital output pin pinMode (ledPin, OUTPUT); }
void loop() { digitalWrite (ledPin, HIGH); // turn on the LED
delay(500); // wait for half a second or 500 milliseconds
digitalWrite (ledPin, LOW); // turn off the LED
delay(500); // wait for half a second or 500 milliseconds }