Example Code for ESP8266-Blink
Last revision 2026/01/12
This article offers a step-by-step guide on using the ESP8266 with a FireBeetle Board to execute a simple LED blink project, ideal for beginners venturing into IoT development.
Hardware Preparation
- FireBeetle ESP8266 IOT Microcontroller (SKU: DFR0489) ×1
- Micro USB Cable ×1
Software Preparation
- Download Arduino IDE: Click to download Arduino IDE.
- CH340 FireBeetle ESP8266 Window Driver, Download Link: Download CH340 FireBeetle ESP8266 Window Driver
Other Preparation Work
Setup Arduino IDE Development Environment
-
Plug FireBeetle to your computer, install the driver manually.
-
Add FireBeetle Board URL to Arduino IDE: Open Arduino IDE, File->Preferences, find Additional Boards Manager URLs, copy the below link, and paste in the blank.
-
Paste URL here.

-
Click OK.
-
Open Tools->Board->Boards Manager, waiting automatic update. You'll find FireBeetle-ESP8266.

-
Now, the development environment has been installed, you can use it like a normal Arduino board.

-
After you have installed the FireBeetle ESP8266 development environment, it will comes with a lot of sample code in Arduino IDE, you can find them in File > Examples.
Sample Code
The default LED for FireBeetle Board-ESP8266 is D5 (IO2), input following code:
// GPIO 2 (D5) has a LED_BLINK attached to it. Give it a name:
int LED_BLINK = 2;
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BLINK, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BLINK, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BLINK, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Result
Cycle blink LED on GPIO2 pin with 1s interval.
ESP8266 has different pinmap in different development environment, For example: the LED connects IO2, which maps D5 in Arduino IDE It is totally different mean with 2 and D2 !
Was this article helpful?

