Set up Arduino IDE for Probot
On this page, you install the ESP32 board package and the Probot library in Arduino IDE. Then you select the board and the partition scheme, and upload the first example code to the board.
Before you start
- A Windows, macOS or Linux computer and an internet connection.
- An ESP32 board (the Probot board) and a USB data cable. A charging-only cable does not let the computer see the board.
Install Arduino IDE
Arduino IDE is the program where you write the code, compile it and send it to the board over USB. Probot code is written in Arduino C++.
- In your browser, open arduino.cc/en/software.
- Download the Arduino IDE 2 installer for your operating system.
- Run the file and finish the installation. If the old Arduino IDE 1.x is installed, remove it. When both versions are open, they both try to use the USB port.
- Open Arduino IDE.
Result: The IDE opens with an empty sketch. The sketch contains the setup() and loop() functions.
Install the ESP32 board package
Arduino IDE does not know ESP32 boards on its own. Espressif's board package teaches the IDE how to compile and upload for ESP32.
Warning
Probot 0.3.0 needs version 3.x of the board package. If 2.x is installed, update it to 3.x. The
ledcAttachChannel function in the servo examples also comes with 3.x.
- Select Tools > Board > Boards Manager.
- In the search box, type
esp32. - In the esp32 by Espressif Systems row, select a version that starts with 3.x.
- Press Install and wait for the installation to finish.
Result: The esp32 by Espressif Systems row shows the version you selected as "installed".
Install the libraries
Probot needs two libraries: the library itself, probot, and Adafruit NeoPixel, which drives the status LED.
- Select Tools > Manage Libraries.
- In the search box, type
probot. - In the probot row, select 0.3.0 in the version list and press Install.
- If the IDE asks whether to install the missing libraries too, press Install all.
- In the search box, type
adafruit neopixel. If Adafruit NeoPixel is not installed, press Install.
Result: In the File > Examples menu, the JoystickTest, ServoTest and TankDrive examples appear under probot.
Select the board and the partition scheme
The board's memory is split into partitions. The Huge APP layout gives the code the most space; in return, wireless updates (OTA) are turned off. Probot does not use OTA.
The partition setting is recommended. The library and the Driver Station use about three quarters of the default partition. As your code grows, compiling stops with the "Sketch too big" error. Huge APP removes this limit.
Warning
The pins in the examples are for the ESP32-S3. On a plain ESP32, GPIO6-11 are connected to the flash memory, and on boards with a WROVER module, GPIO16-17 are connected to the PSRAM. Replace these pins in the examples with free pins such as 25, 26 and 27, and use GPIO34-39 for inputs only.
- Open the Tools > Board menu.
- In the list of ESP32 boards, select ESP32S3 Dev Module. If your board is a plain ESP32 and not an ESP32-S3, select ESP32 Dev Module.
- In Tools > Partition Scheme, select Huge APP (3MB No OTA/1MB SPIFFS).
Result: In the Tools menu, the Board row shows the board you selected, and the Partition Scheme row shows Huge APP (3MB No OTA/1MB SPIFFS).
Check these two rows before every upload.
Upload the first code
Test your setup with the library's own example. JoystickTest writes the gamepad values to the Driver Station.
- Select File > Examples > probot > JoystickTest.
- If there are other boards in the classroom, replace the name
"Probot"in thePROBOT_WIFI_AP_SSIDline with your robot's name. - Connect the board to the computer with the USB data cable.
- In the Tools > Port menu, select the board's port. On Windows, a name like
COM3appears; on Linux and macOS, a name that starts with/dev/. - In the toolbar, press Upload (the right arrow icon).
- When the upload is done, open Tools > Serial Monitor and select 115200 baud in the speed list.
Result: The IDE shows "Done uploading." When the board starts, it writes these lines to the Serial Monitor (if you changed the network name, that name appears):
[DS ] ========================================
[DS ] WiFi SSID: Probot
[DS ] Password: ********
[DS ] Channel: 3 (macro)
[DS ] IP Address: 192.168.4.1
[DS ] ========================================
The robot's network appears in the WiFi list of your computer or phone. The example's password is Probot1234.
Having trouble?
- The port list is empty: See The port list is empty or the upload fails.
- "Sketch too big": The partition scheme is wrong. See "Sketch too big".
- "probot.h: No such file or directory": The library is not installed. See probot.h is not found.
- "Adafruit_NeoPixel.h: No such file or directory": See The NeoPixel library is missing.
Next step
First 10 minutes: write your own first code, connect to the robot's network and read the gamepad.