Arduino IDE Settings for ESP32 MCU

Let’s use the Wi-Fi equipped Leaf!

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

What to prepare

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

Installing Arduino IDE

For instructions on how to install the Arduino IDE, please see here.

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.

  https://dl.espressif.com/dl/package_esp32_index.json


  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() {
  Serial.begin(115200);
  pinMode(pushButton, INPUT);
}

void loop() {
  int buttonState = digitalRead(pushButton);
  Serial.println(buttonState);
  delay(1);
}
  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.

Specifying pins for a sketch

**Pin should be specified by Port, not Name.**

制限事項

※1:Output cannot be set
※2:①For UART1, the pin number is set to RX=26 and TX=25. For UART0 and UART2, the pin number is not specified.

HardwareSerial Serial1(1); // UART1 (RX=9, TX=10)

void setup() {
  Serial1.begin(9600, SERIAL_8N1, 26, 25); // ピンを変更 (RX=26, TX=25)
}

  ②Cannot be used as analog input if WiFi.h is included

※3: Pull-up prohibited because it is used for bootstrapping

Installing Libraries

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

When in doubt.

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

Back to previous page

Last modified 01.01.0001