Afro ESC
Download
AVRA.$ git clone https://github.com/Ro5bert/avra.git
Build and install
AVRA$ cd avra && sudo make install
Download the firmware
$ git clone https://github.com/hippocampusrobotics/tgy.git
Build the firmware. This depends on the interface used. The classic way to go is PWM. But if you want to control the ESCs directly from the Raspberry Pi, you might want to use I2C.
Modify at least the following lines in
tgy.asmRC_PULS_REVERSE = 1 ; This enables forward/reverse throttle RC_CALIBRATION = 0 ; STOP_RC_PULS = 1000 ; minimum pwm value FULL_RC_PULS = 2000 ; maximum pwm value
Optionally fiddle with the deadband
RCP_DEADBAND = 50 ; default value
Build the firmware
$ make all
Build the firmware in 8 different versions with different
MOTOR_IDvalues starting from0x29and increasing by 1 per step.$ make build_8
Connect the Afro Programmer with your computer and connect the data wires with the ESC. Supply the ESC with an appropriate voltage (probably ~10-12V).
Install or
downloadavrdude.Attention
Newer versions of
avrdudedo not seem to work with the AFRO programmer. So you may want to stick with the older version in the download.Flash the
afro_nfet.hexfirmware you have built before.$ avrdude -b 9600 -p m8 -P /dev/ttyUSB0 -c stk500v2 -e -U flash:w:afro_nfet.hex.0:i
Important
Make sure
avrdudeverifies the flashed data successfully. Otherwise rebuilt the firmware withmake clean && make alland try again.