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,M3andM4Logical motor port numbers.
MOTOR_PORTSDictionary mapping each logical motor port to its PCA9685 PWM channels and encoder GPIO pins. Used internally by
evo.EvoMotor.TACH11throughTACH42Encoder input GPIO numbers for the four motor ports.
MOTOR11throughMOTOR42PCA9685 PWM channel numbers for the four motor ports.
I2C1throughI2C8TCA9548A multiplexer channel constants.
SDA0_PIN,SCL0_PIN,SDA1_PINandSCL1_PINESP32-S3 GPIO numbers used by the two I2C buses.
TCA9548A_ADDR,SSD1309_ADDR,SSD1309_CHANNEL,BATTERY_CHARGER_ADDRESSandPCA9685PW_ADDRESSDefault onboard I2C device addresses and OLED channel.
I2CAandI2CBPre-created
machine.I2Cbus objects.
EVOX1P Constants#
GPIO1A,GPIO1B,GPIO2AandGPIO2BGeneral-purpose external GPIO pins.
SERVO1throughSERVO4Servo output pins.
BUZZER_PINBuzzer GPIO pin.
BUTTON_L_PIN,BUTTON_C_PINandBUTTON_R_PINLeft, centre and right button GPIO pins.
NSLEEP_PINShared motor-driver sleep control pin, used by
enableAllMotors()anddisableAllMotors()when present.BOOT_LED_PINandSHUTDOWN_PINBoot LED and shutdown-control GPIO pins.
EVOX1E Constants#
S11throughS42LEGO sensor-port GPIO pins.
S1throughS4Convenience aliases for the first pin of each LEGO sensor port.
GPIO1throughGPIO8General-purpose external GPIO aliases.
SERVO1throughSERVO8Servo port constants.
BUZZER_PINBuzzer GPIO pin.
BUTTON_PINMain button GPIO pin.
NEOPIXEL_PINNeopixel status LED GPIO pin.