-
Notifications
You must be signed in to change notification settings - Fork 42
Configuration
The firmware features a UNIX-style console (no echo, LF as EOL) on the signal wire at 38400 baud 8N1 using a generic USB-TTL adapter. Although not strictly required (see below), the following simple circuit is needed to convert two RX/TX pins on the USB-TTL adapter into one wire for a two-way communication with the ESC:
In case of a simplified one-way communication when the ESC is connected to the TX and GND pins, type play
to make sure the connection is working. You should hear a beep in return. Please note that you will not receive responses to commands in this case obviously.
Examples depending on socat's flavour:
$ socat - /dev/ttyUSB0,rawer,b38400
$ socat - /dev/cu.SLAB_USBtoUART,rawer,ispeed=38400,ospeed=38400
Since standard PuTTY uses CR as EOL for serial connections, download modified PuTTY.
Open a serial connection, turn on echo, and enable CR/LF:
Print basic usage help.
Print ESC information.
Print settings.
Print the value of <param>
.
Set <param>
to <value>
and print the resulting (possibly trimmed) value.
Play <music>
(or startup music if omitted) with <volume>
(or startup music volume if omitted).
Save settings.
Enable arming (wait for zero throttle on startup):
-
0
: off -
1
: on
Enable damped mode (regenerative braking):
-
0
: off -
1
: on
Reverse motor direction:
-
0
: off -
1
: on
Motor timing (3.75*X degrees) [0..7].
Minimum PWM frequency (kHz) [16..96].
Maximum PWM frequency (kHz) [16..96].
Minimum duty cycle (%) [0..100].
Maximum duty cycle (%) [0..100].
Acceleration/deceleration speed limit (0.5*X %/ms) [1..200]. Higher values bring more agility to fast throttle changes, yet might increase the chance of sync loss.
Drag brake amount when the motor is stopped (%) [0..100]. This value is also a starting brake amount in proportional brake mode.
Throttle mode:
-
0
: forward -
1
: forward/reverse -
2
: forward/brake/reverse (proportional brake mode)
Automatic throttle calibration using pulse period as a reference:
-
0
: off -
1
: on
Minimum throttle (µs).
Middle throttle (µs).
Maximum throttle (µs).
Serial input mode:
-
0
: off -
1
: on (*) -
2
: iBUS -
3
: S.BUS
(*) Throttle value is transmitted at 115200 baud 8N1 as two bytes - first low byte, then high byte. Lower 12 bits of the 16-bit value are the throttle value from -2000 (full reverse) to 2000 (full forward), higher 4 bits are the CRC (XOR'ed nibbles).
iBUS/S.BUS channel ID.
Music #1 (startup), #2, and #3.
Music volume #1 (startup), #2, and #3.
Last error code.
A sequence of characters is translated into music in the following way:
-
_
(underscore) is a pause; -
cdefgab
are low notes; -
CDEFGAB
are high notes; -
#
(pound) after a note makes it a sharp note; -
12345678
after a note or pause is a duration: 1 - 1/16 (default), 2 - 1/8, 3 - 3/16, 4 - 1/4, etc.
Examples:
play cdefg_g_a2Cag_g
play a2D_D3EF#2D_D3C#b2E_E3DC#2a_a3
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. NOT FOR MILITARY USE. May all beings be happy.