Skip to content
Shop

ESP32 MCU: Arduino IDE Setup

Set up with your favorite AI

Gemini & other AI

Copy the setup prompt into your AI. Work through each step together, from checking your kit to getting it running.

Open Gemini

Copy the prompt, then paste it into Gemini’s message box.

View prompt

Use Arduino IDE to set up the development environment for the AP02 ESP32 MCU leaf (ESP32-WROOM-32).

  • ESP32 Wi-Fi Kit
  • Data-capable USB cable
  • PC (Windows, macOS or Linux)
  1. Open the Arduino website and go to SOFTWARE.
  2. Download the installer for your operating system.
  3. Run the installer and follow its instructions.

Older versions are available from Previous IDE Releases.

Connect to your PC with a USB cable.

Configuration of the microcontroller board

Section titled “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. Use the version selector if you need to select a specific version.


  1. Choose Tools → Board → ESP32 Dev Module.
  2. Choose the connected serial port from Tools → Serial Port. If it is not listed, see Serial port not found.

Checking the operation of the microcontroller board

Section titled “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.

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

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

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