How to Program an ESP32 and Upload Code with PyBot Labs
Short answer: open the PyBot IDE in Chrome or Edge, drag blocks or write MicroPython, connect to your Beaver Board over Bluetooth, and press Run. There is nothing to install, no drivers, and no USB cable.
What you need
- A PyBot Beaver Board (ESP32-WROOM-32, $49 CAD, ships from Canada) with 4 AA batteries.
- A computer, laptop or Chromebook running Google Chrome or Microsoft Edge (Web Bluetooth is required). An iPad works with the free PyBot Labs iPad app.
- A free PyBot Labs account is optional for trying the IDE and needed to save projects.
Step 1: Write your code
Open the IDE at https://app.pybotlabs.com/en/ide and pick one of two modes:
- Blocks: drag Blockly blocks (Scratch-style). A live preview shows the real MicroPython your blocks generate.
- Python: the Python IDE at https://app.pybotlabs.com/en/python-ide has autocomplete for the
pybotlibrary and a built-in cheat sheet.
A first program that blinks the red LED:
import pybot, time
while True:
pybot.led.on("RED")
time.sleep(0.5)
pybot.led.off("RED")
time.sleep(0.5)Guided tutorials with progress tracking are at https://app.pybotlabs.com/en/tutorials.
Step 2: Power the board
Insert 4 AA batteries and plug the pack into the PWR connector. The OLED screen shows the board name (for example PyBot-BB-042) and a 6-digit PIN with the message "Connect in app".
Step 3: Connect over Bluetooth
- In the IDE, click Connect, then Bluetooth.
- Choose the device named
PyBot-BB-…in the browser's device picker. - Enter the PIN shown on the OLED the first time. A computer you have paired before reconnects automatically.
Step 4: Upload and run
- Click Run to send your program to the board and start it immediately.
- Choose Save to board to store it so it runs every time the board powers on.
To upload a new version, just press Run again. The board stops the old program and receives the new one.
Why this is easier than Thonny or the Arduino IDE
| PyBot Labs | Thonny / Arduino IDE | |
|---|---|---|
| Install | None, runs in the browser | Desktop app plus board drivers |
| Cable | None, Bluetooth upload | USB cable required |
| First run | Connect, press Run | Select port, install board package or firmware |
| Beginner-friendly | Blocks with live Python preview | Text code only |
| Hardware wiring | Pre-wired board | Usually breadboard and jumper wires |
Troubleshooting
- Board not in the picker: make sure you are using Chrome or Edge, Bluetooth is on, and the board shows its name and PIN on the OLED.
- Wrong PIN: use the 6-digit number currently shown on the OLED.
- Need a clean slate: hold Switch A while powering on for maintenance mode, or Switch B for BLE-only mode (skips the saved program).
Pin assignments are in the Beaver Board pinout. Function reference: pybot library.