Board Pins#

Both EVOX1P and EVOX1E freeze a module named pins:

import pins

The module defines physical pins, I2C buses, PCA9685 channels and motor-port mappings used by the MicroPython firmware.

Common Constants#

M1, M2, M3 and M4

Logical motor port numbers.

MOTOR_PORTS

Dictionary mapping each logical motor port to its PCA9685 PWM channels and encoder GPIO pins. Used internally by evo.EvoMotor.

TACH11 through TACH42

Encoder input GPIO numbers for the four motor ports.

MOTOR11 through MOTOR42

PCA9685 PWM channel numbers for the four motor ports.

I2C1 through I2C8

TCA9548A multiplexer channel constants.

SDA0_PIN, SCL0_PIN, SDA1_PIN and SCL1_PIN

ESP32-S3 GPIO numbers used by the two I2C buses.

TCA9548A_ADDR, SSD1309_ADDR, SSD1309_CHANNEL, BATTERY_CHARGER_ADDRESS and PCA9685PW_ADDRESS

Default onboard I2C device addresses and OLED channel.

I2CA and I2CB

Pre-created machine.I2C bus objects.

EVOX1P Constants#

GPIO1A, GPIO1B, GPIO2A and GPIO2B

General-purpose external GPIO pins.

SERVO1 through SERVO4

Servo output pins.

BUZZER_PIN

Buzzer GPIO pin.

BUTTON_L_PIN, BUTTON_C_PIN and BUTTON_R_PIN

Left, centre and right button GPIO pins.

NSLEEP_PIN

Shared motor-driver sleep control pin, used by enableAllMotors() and disableAllMotors() when present.

BOOT_LED_PIN and SHUTDOWN_PIN

Boot LED and shutdown-control GPIO pins.

EVOX1E Constants#

S11 through S42

LEGO sensor-port GPIO pins.

S1 through S4

Convenience aliases for the first pin of each LEGO sensor port.

GPIO1 through GPIO8

General-purpose external GPIO aliases.

SERVO1 through SERVO8

Servo port constants.

BUZZER_PIN

Buzzer GPIO pin.

BUTTON_PIN

Main button GPIO pin.

NEOPIXEL_PIN

Neopixel status LED GPIO pin.