Beaver Board ESP32 Pinout and Wiring

The PyBot Beaver Board is built around an ESP32-WROOM-32 module. Everything below is already wired on the board, so no breadboard or jumper wires are needed. Students normally use the pybot library or Blockly blocks and never touch GPIO numbers; this table is for makers, teachers and anyone writing raw MicroPython.

Pin map

FunctionESP32 GPIONotes
Switch A33Pull-up, active-low. Hold at power-up for maintenance mode.
Switch B25Pull-up, active-low. Hold at power-up for BLE-only mode.
Switch C18Pull-up, active-low. No header.
Line sensor left36Input-only pin, external 10 kΩ pull-up, reads low over a dark line.
Line sensor right39Input-only pin, external 10 kΩ pull-up, reads low over a dark line.
Internal I2C (bus 0) SDA / SCL21 / 22SHT40 temperature and humidity sensor (0x44), SSD1306 128x64 OLED (0x3C).
External I2C (bus 1) SDA / SCL16 / 17Header for add-on sensors. Carries the VL53L4CD distance sensor (0x29) when fitted.
Left motor IN1 / IN213 / 12DRV8833 driver, 1 kHz PWM. The left motor is mounted mirrored, so forward drives IN1.
Right motor IN1 / IN214 / 27DRV8833 driver, 1 kHz PWM.
Motor driver nSLEEP15Active-high, externally pulled down. The pybot library wakes it automatically.
Red / yellow / green LED2 / 4 / 5PWM-dimmable at 1 kHz.
Buzzer26PWM tones.
Light sensor (PT19)34ADC1 channel 6. Use 11 dB attenuation for the full range.
Battery voltage sense35ADC1 channel 7 through a 27 kΩ / 10 kΩ divider (multiply the reading by 3.7).
Servo header2350 Hz PWM. Header pins: signal, V+, GND.
Spare analog / digital32On the spare-pin header. ADC1 capable.
Spare digital19Test pad only.
UART0 TX / RX1 / 3Connected to the USB-UART chip, not to a header.
BOOT button0Holding it at power-up enters the ESP32 serial bootloader.

Connectors and headers

  • PWR — keyed 2-pin JST for the battery pack (4 AA batteries).
  • MOT-A (left) and MOT-B (right) — 2-pin JST motor connectors.
  • Line sensor header — L/36, R/39, 3V3, GND.
  • External I2C header — SDA/16, SCL/17, 3V3, GND.
  • Spare-pin header — GPIO 32, 3V3, GND.
  • Servo header — signal (GPIO 23), V+, GND.

Pins to avoid in your own code

  • GPIO 6–11 are wired to the module's SPI flash. Using them crashes the board.
  • GPIO 0, 1, 3 and 15 are used internally (boot mode, USB-UART, motor-driver sleep).
  • GPIO 12 is a strapping pin. Never add an external pull-up to it.
  • GPIO 34, 35, 36 and 39 are input-only and have no internal pull-up.
  • ADC2 pins cannot be read while Wi-Fi is on. All analog inputs on the Beaver Board use ADC1.

Using the pins from MicroPython

import pybot

pybot.led.on("GRN")          # GPIO 5
pybot.motor.forward(60)      # GPIO 13/12 and 14/27, speed 0-100
print(pybot.light())         # GPIO 34, 0-100
print(pybot.temperature())   # SHT40 on internal I2C

Raw access works too:

from machine import Pin, PWM

red = Pin(2, Pin.OUT)
red.value(1)

buzzer = PWM(Pin(26), freq=2700, duty=512)

See the pybot library reference for every function.