This guide provides step-by-step instructions for setting up and uploading the Arduino code for the ESP8266 LED Interfacing with Button project.
-
Download and install the Arduino IDE from the official Arduino website.
-
Follow the installation instructions provided for your operating system.
-
Open the Arduino IDE.
-
Go to
File
>Preferences
. -
In the
Additional Board Manager URLs
field, add the following URL:
http://arduino.esp8266.com/stable/package_esp8266com_index.json
-
Click
OK
to close the Preferences window. -
Go to
Tools
>Board
>Boards Manager...
. -
Search for
esp8266
and install theesp8266
board package by ESP8266 Community.
-
Connect your ESP8266 board to your computer via USB.
-
Go to
Tools
>Board
and selectLOLIN(WeMos) D1 R1
as the board. -
Go to
Tools
>Port
and select the port to which your ESP8266 board is connected.
-
Open the Arduino code file (
LED_Button_Interfacing.ino
) in the Arduino IDE. -
Verify and compile the code by clicking the checkmark icon (Verify) in the upper left corner of the Arduino IDE.
-
Once the code is compiled without errors, upload it to the ESP8266 board by clicking the right arrow icon (Upload) next to the Verify button.
-
Wait for the upload process to complete.
-
After uploading the code, open the serial monitor by clicking
Tools
>Serial Monitor
. -
Set the baud rate to
115200
. -
Press the push button connected to pin D4 to toggle between LED lighting modes.