ESC32 Command Line Interface
The CLI (Command Line Interface) is the most basic way of accessing, configuring, and testing the ESC32
The CLI interface can be accessed via USB or Serial using a terminal program like Putty with the following settings:
230400 baud, 8 bits, 1 stop bit.
Once accessed, the CLI will respond with version serial number, and be ready to receive a command.
New: You can also use the CLI interface embedded in the AutoQuad ESC Configuration Utility. Get more info on our dedicated Wiki page.
Type “help” – This will bring up a list of commands available:
> helpAvailable commands:armbeepbinarybootloaderconfig [READ | WRITE | DEFAULT]disarmdutyhelpinput [PWM | UART | I2C | CAN]mode [OPEN_LOOP | RPM | THRUST | SERVO]playposrpmsernoset LIST | [ ]startstatusstoptelemetryversion>
Command Overview
Some are simple commands, like arm, start, stop, disarm and some like “duty” or “rpm” needs to be stated with a value or parameter and value added. The ESC will respond if the Command is valid.
Example – Arming, Starting, Running, Stopping & Disarming
“arm” will set the input mode to UART and arm the motor:
> armInput mode set to UARTESC armed
“start” will start the motor
> startESC started
“duty 20” will set the motor duty (throttle) to 20 percent
“Stop” will stop the motor
“Disarm” will disarm the motor
“mode RPM” will set the esc to Closed loop RPM mode for this session.
“input CAN” will change the input to CAN for this session.
Configuring Parameters from the CLI
Typing “set list” will bring up the list of changeable parameters and list their current value – shown below for a ESC32v3:
set listSTARTUP_MODE = 0BAUD_RATE = 230400 baudPTERM = 0.500ITERM = 0.00500FF1TERM = +0.00000e+00FF2TERM = +0.00000e+00MIN_PERIOD = 50 usMAX_PERIOD = 12000 usADVANCE = 15.00 DegsSTART_VOLTAGE = 0.75 VoltsGOOD_DETECTS_START = 48BAD_DETECTS_DISARM = 32MAX_CURRENT = 20.00 AmpsSTART_CURRENT = 0.75 AmpsSWITCH_FREQ = 20.0 KHzMOTOR_POLES = 14PWM_MIN_PERIOD = 2200 usPWM_MAX_PERIOD = 25000 usPWM_MIN_VALUE = 750 usPWM_LO_VALUE = 1000 usPWM_HI_VALUE = 1950 usPWM_MAX_VALUE = 2250 usPWM_MIN_START = 1100 usPWM_RPM_SCALE = 6000 RPMACTIVE_FREEWHEEL = 1THR1TERM = +0.00000e+00THR2TERM = +1.00000e+00RPM_MEAS_LP = 0.750SERVO_DUTY = 5.0 %SERVO_P = 0.050SERVO_D = 0.000SERVO_MAX_RATE = 1000.0 deg/sSERVO_SCALE = 360.0 degESC_ID = 1DIRECTION = 1AUDIO_VOLUME = 0.0
To change any parameter simply type “set” followed by the parameter name and its new value. Changes will be applied immediately, but wont be made permanent until written to flash memory.
To change the direction of the motor, type
> set DIRECTION -1DIRECTION = -1
Or to set the number of motor poles to 28:
> set MOTOR_POLES 28MOTOR_POLES = 28
Writing to flash memory:
Once you have configured everything, you need to make the configuration permanent by writing it to flash memory or your changes will be lost when the ESC is powered off.
To write the current configuration to flash memory, type
config WRITE