In this tutorial, we will write Arduino program to ESP-WROOM-02 so we can use the wifi module as an Arduino MCU. From this time on, we will be using ESP-WROOM-02 development board which we can easily try ESP – WROOM – 02 we introduced in the previous installment.
First, in order to use ESP-WROOM-02 as Arduino, we need to make sure we’re using the proper version of Arduino IDE. In the past, Arduino IDE used to be released from two separate websites: arduino.cc and arduino.org. To use ESP-WROOM-02, please install the Arduino IDE released from arduino.cc. (Now the two websites are sort of merged so when you go to arduino.org, you will be redirected to arduino.cc.)
Figure 1. Arduino IDE download screen from arduino.cc
Add ESP-WROOM-02 to Arduino
To use ESP-WROOM-02 as Arduino, you need to add the ESP-WROOM-02 board to Arduino IDE. Follow the steps below to add ESP-WROOM-02 to Arduino.
Start the Arduino IDE.
Open “File” → “Preferences”
Under “Preferences,” enter the following URL in “Additional Boards Manager URLs:”
This is an administration manager function that you can use to easily add new boards to Arduino by entering the URL describing the board information.
Figure 2. Arduino IDE preference screen
After entering the URL, click “OK” at the bottom right corner of the “Preferences” screen and close it. Next, select “Tools” → “Board” → “Boards Manager”.
Figure 3. “Tools” → “Board” → “Boards Manager”
Once the board manager screen is displayed, enter “ESP 82” in the search field. It will be displayed as ESP8266. Since this ESP8266 is a board corresponding to ESP-WROOM-02, press “Install” to add a board.
Figure 4. Boards Manager Screen
After the installation is completed, restart Arduino, and open “Tools” → “Board” once again. If you see a set of boards related to ESP8266 added, then it’s done!
Figure 5. Adding ESP8266
Now that the preparation is complete, let’s write an Arduino program!