- Torquetuner (Firmware version: 20221020)
Modified from the T-Stick firmware update instructions INSTALL ALL DEPENDENCIES AND REAL ALL OBSERVATIONS BEFORE UPLOAD !
- Install OpenOCD on your device.
- Clone moteus: https://github.com/IDMIL/Moteus/tree/RotaRep branch.
- In the
moteus
directory, build the moteus firmware:
tools/bazel build --config=target //:target --verbose_failures
- (optional) test
tools/bazel test --config=target //:target
-
Connect the power cable to power input of the controller (with the power supply unplugged from the wall).
-
Connect the canfd connector to the controller.
-
Connect the fdcanusb to the usb port of the PC.
-
You may now plug the power supply into the wall.
-
A green light on the controller should now appear.
-
Connect the USB stick to the board using the JST ZH-6 and plug in the USB stick into the computer.
-
Flash with debug USB stick:
./fw/flash.py
Upon succesful flash, the following lines will be output:
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
...
shutdown command invoked
Note: if you encounter the error message:
Info : STLINK V2J29S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.223809
Error: init mode failed (unable to connect to the target)
check the different connections related to the power supply.
- Install tview using pip:
pip install moteus-gui
- Launch Moteus GUI:
python -m moteus_gui.tview --devices=1
- In the Moteus GUI, check the I2C state and status:
d i2c.state
d i2c.status
For now state should be READY or LISTEN and status ERROR or BUSY (with no other i2c device connected).
- To download and install PlatformIO, follow the instructions at https://platformio.org/platformio-ide. We recomment using PlatformIO under Visual Studio Code, but you can also choose another editor.
- Clone this repository using
git clone https://github.com/IDMIL/TorqueTuner.git
. Alternatively, you can download the repository as a zip file at https://github.com/IDMIL/TorqueTuner. Take note of the folder location.
- Open the Torquetuner software folder in VSC/PlatformIO. You can get help on how to use PlatformIO at https://docs.platformio.org/en/latest/core/quickstart.html
- Open the
config.json
file in the Data folder to make changes before uploading. - If it is the first time flashing, you may see an error pointing to the ESP32 inet.h file. The file requires manual fixing. Check the issue at mathiasbredholt/libmapper-arduino#3
When ready, you need to flash both the firmware and the filesystem image. Choose the proper platform accordingly (tinypico) and use the PlatformIO menu to flash the image to the Torquetuner.
After flashing, you can use the VSC/PlatformIO serial monitor to check if the Torquetuner module is booting properly. You should see Torquetuner booting process.
You can also interact with the controller using the following commands:
- 'reboot' to reboot
Torquetuner connection guide – v1.0
How to build a Torquetuner Module
Torquetuner V1 - TinyPico - USB - WiFi Input Devices and Music Interaction Laboratory (IDMIL)