Skip to main content
VESC extensions are built-in functions available in all LispBM scripts running on VESC hardware. They expose motor control, sensor reading, CAN communication, hardware I/O, and more. Extensions are registered at startup — no import is needed.
Extension availability varies by platform and firmware version. Functions marked ESC run on STM32-based controllers. Functions marked Express run on VESC Express (ESP32). Many extensions work on both.

Console and utilities

Motor set commands

These functions command the motor. Each call also resets the timeout watchdog.
All motor set commands are ESC-only. They have no effect on VESC Express.

Motor get commands

All motor get commands accept an optional optFilter argument. When set to 1, the return value is the average since the function was last called rather than the instantaneous reading.

Configuration

conf-get and conf-set read and write motor and application configuration parameters. Parameters are identified by quoted symbols.
Calling conf-store writes to flash memory. Avoid calling it in a tight loop — flash has a limited write cycle lifetime.

CAN bus

LispBM provides both low-level frame I/O and high-level VESC protocol commands over CAN.

Low-level CAN frames

VESC protocol over CAN

can-cmd sends a LispBM expression to another VESC on the CAN bus and returns the result:

CAN message events

Enable CAN event processing to receive frames asynchronously:

IMU and sensors

GPIO

Available pin symbols: pin-rx, pin-tx, pin-swdio, pin-swclk, pin-hall1, pin-hall2, pin-hall3, pin-adc1, pin-adc2, pin-ppm. Pin mode symbols: pin-mode-out, pin-mode-od, pin-mode-in, pin-mode-in-pu, pin-mode-in-pd, pin-mode-analog.

AUX outputs

The AUX output mode must be set to Unused in Motor Settings → General → Advanced. Otherwise the firmware will override any value set from Lisp.

UART

I2C

EEPROM (persistent storage)

Small amounts of data can be stored persistently across reboots:

BMS interface

Statistics

Plotting

Send data to the VESC Tool plotter: