Arduino firmware that allows convert T3PA Pedals
to USB
. It allows to use T3PA Pedals
with other wheel bases as a regular 3 axis joystick.
Is important note that this firmware allows to convert any pedals to USB
or build your own pedals and use it through USB
port as a regular 3 axis joystick. Both the circuit and firmware are agnostic, could be used for any pedals project.
- Arduino IDE
jupyterlab
(Optional)pysearial
(Optional)- anaconda / miniconda / mamba (Optional)
- Arduino Leonardo compatible board with Atmega32u4 chipset. Atmega32u4 supports HID interface via USB. Arduino pro micro is an excellent selection because is a very tiny board.
3
x 0.2 µF capasitors. Used to remove electric noise from arduino analog inputs (A0
,A1
andA2
).
You could change T3PA Pedals
settings via serial terminal
.
- Open a
serial terminal
with Putty and make a conection withCOM
(windows) or/dev/ttyACM0
(linux) ports [1] at9600
baud [2].
-
Press all pedals at same time to enter to config mode. You should see the following message on the serial terminal:
Config mode: ON
-
See help with
help
command:----------------------------------------------------------- T3PA - Pedals ----------------------------------------------------------- You can modify settings by sending a JSON to device. You can also read current settings. All settings are saved into device internal memory. ----------------------------------------------------------- Options: 1. Use 'show' command to see current settings. 2. Send a json to update settings. 3. Use 'off' command to finish config mode. -----------------------------------------------------------
-
See current settings with
show
command:Settings: { "clutch_smoothing_factor": 0.99, "break_smoothing_factor": 0.99, "throttle_smoothing_factor": 0.99 }
-
Change settings with a
json
command:Command:
{"clutch_smoothing_factor": 0.95, "break_smoothing_factor": 0.95, "throttle_smoothing_factor": 0.95}
Output:
Loading json settings... Appling settings... Saving settings... Settings: { "clutch_smoothing_factor": 0.95, "break_smoothing_factor": 0.95, "throttle_smoothing_factor": 0.95 }
Important: The firmware applies an Exponentially Weighted Moving Average (EWMA) to each pedal. EWMA uses a Smoothing Factor to control the average level over each pedal signal. The higher the value, the less smoothing (higher impact of the latest reading). For more details, see EWMA. In this project, EWMA is primarily used as a method to eliminate electrical noise on analog inputs, finding a curve that fits better to the input data points detected in analog inputs.
-
Finish config mode with
off
command:Config mode: OFF
Important: The Config mode
minimizes pedal input lag by eliminating the need to wait for serial commands. This mode increase the execution time in the main program loop.
See example notebook
-
Create python env and install required libraries.
conda create -n t3pa conda install pyserial conda install jupyterlab
-
Enable python env.
conda activate t3pa
-
Open jupyterlab
jupyter lab
-
Open and run
notebook.ipynb