Arduino
Electronics platform
Last updated
Electronics platform
Last updated
We'll be using the Arduino platform and IDE to write our code
Download and install the Arduino IDE.
Download Arduino IDE for
Copy this URL
Open the Arduino IDE preferences
In the Additional Boards Manager URLs
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
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
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
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
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
After updating or installing libraries, restarting Arduino IDE is required for changes to take effect
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
Click the upload button on the top bar of the Arduino IDE
Enjoy your blinking RGB led!
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