Arduino IDE Settings for ESP32 MCU

Let’s write a program in Leafony!

Follow the steps below to set up the ESP32 Wi-Fi Kit development environment.

What to prepare

  • ESP32 Wi-Fi Kit
  • PC (Windows, Mac OS X or Linux)

Installing Arduino IDE

The Arduino IDE is a development environment for the Arduino, an open source hardware platform for electronics.

. The development environment allows you to write programs, write programs to the Arduino board, and display the data coming from the board.
. Leafony can be developed with the Arduino IDE.

Let’s download the Arduino IDE right away.

  1. From the Arduino website, go to “SOFTWARE” and then “DOWNLOADS” to get to the Arduino IDE download page.
  2. Download the installer for your OS at the place where it says “Download the Arduino IDE”.
  3. Run the downloaded installer and follow the on-screen instructions to install the Arduino IDE.

Connecting to PC

Connect to your PC with a USB cable.

Configuration of the microcontroller board

To use the ESP32 MCU leaf with the Arduino IDE, you need to install Arduino core for the ESP32.

  1. Open the File → Preferences in the Arduino IDE and enter the following URL in the Additional Board Manager URL: field.

  1. Select Tools -> Board -> Board Manager, search for esp32 by Espressif Systems and press the Install button.

  1. Choose Tools → Board → ESP32 Dev Module to get your ESP32 MCU working.

Checking the operation of the microcontroller board

Let’s write a Sample App and get the ESP32 Wi-Fi Kit running.

  1. Launch the Arduino.
  2. Paste the following sample code into your code editor.
// ボタン入力の状態をシリアルモニタに表示するサンプル
int pushButton = 0;

void setup() {
  pinMode(pushButton, INPUT);

void loop() {
  int buttonState = digitalRead(pushButton);
  1. Select the COM port to which the ESP32 leaf is connected.
  2. Push the write to microcomputer board button to write a sketch.
  3. Press and hold the Boot mode switch on the ESP32 leaf when the following message appears during the writing process.

  1. Open the serial monitor and set the communication speed to 115200bps.
  2. Press the Boot mode switch (IO0) and see if the input state of the switch changes.

When in doubt.

If it doesn’t work, go to “If it doesn’t work…” to find a solution.

Installing Libraries

To use some of the leaves, you will need to install additional libraries.
Follow the steps below to install all libraries in advance.

1. Library to use

The libraries used in each Kit are as follows.

Leaf Required Library Recommended version Description
BLE TBGLib Bluetooth Library
4-Sensors Adafruit_Sensor.h Unified Sensor Driver
Adafruit_BusIO_Register.h Bus IO Library
HTS221.h Temperature and humidity sensor library
ClosedCube_OPT3001.h Illuminance sensor library
Adafruit_LIS3DH.h 1.1.2 Accelerometer Library
LCD ST7032.h LCD Library
AVR MCU MsTimer2.h Timer interrupt library
RTC&MicroSD RTClib.h RTC Library

2. Download the library from Github

Clicking on the links in the table above will take you to the library’s GitHub repository. Click Code → Download ZIP to download the library.


3. Include Library

Launch the Arduino and choose Sketch → Include Library → Install ZIP Library to load the zip file you just downloaded.


Last modified 01.01.0001