Arduino
Electronics platform
Arduino
We'll be using the Arduino platform and IDE to write our code
Install Arduino IDE
Download and install the Arduino IDE.
Download Arduino IDE for
Install board definitions
Copy this URL
Open the Arduino IDE preferences
In the
Additional Boards Manager URLs

Install the esp8266 boards definitions
Open the Board Manager in Tools › Board › Boards Manager
Search for esp8266
Install the boards definition
Close Arduino and open it again so the board configurations are loaded
Configure Arduino for this project
Connect your board using the USB cable.
Make sure you are using the appropriate COM port under Tools › Port
Make sure you have selected the appropriate board board under Tools › Board:
Use LOLIN (WEMOS) D1 mini Pro

Install libraries
AdaFruit Neopixel
We are going to use the Library Manager to install this library

Open the Library Manager by clicking on the menu Sketch › Include Library ›
Manage Libraries
Search for neopixel
Select Adafruit NeoPixel by Adafruit
Click the Install button
Don't close the Library Manager dialog yet
ArduinoJson
We will use the Library Manager again to install this one
Open the Library Manager by clicking on the menu Sketch › Include Library › Manage Libraries
Search for ArduinoJson
Select ArduinoJson by Benoit Blanchon
Make sure you select the v5 version
Click the Install button
Don't close the Library Manager dialog yet
Firebase ESP8266 Client
We will also install this library using the Library Manager
Open the Library Manager by clicking on the menu Sketch › Include Library › Manage Libraries
Search for firebase
Select FirebaseESP8266 Client by Mobitz
Click the Install button
Close the Library Manager
Restart Arduino IDE
After updating or installing libraries, restarting Arduino IDE is required for changes to take effect
Test program
Let's write a program that tests our RGB LED and its connections. First, open the Arduino IDE
Notice that Arduino programs have at least two functions:
Setup runs once when the device starts
Loop runs again and again, indefinitely, while the device is powered on.
Let's copy the code below and make some magic happen
Flash your program
Click the upload button on the top bar of the Arduino IDE
Enjoy your blinking RGB led!

Debugging
The serial monitor
Let's take a look under the hood. Open the Serial Monitor on Tools › Serial Monitor
Make sure the baud rate on this window matches the one in the code
Watch as your code runs

References
Last updated
Was this helpful?