3.d. LED Feedback

This section explains the meanings of the various illumination patterns of the TReX’s LEDs. The TReX has eight colored LEDs as shown below:

TReX LEDs


  • Power LED (1): The blue power LED is located on the top board. When it is brightly illuminated, the TReX is receiving power and is running. Note that the power LED can occasionally glow dimly when the TReX is unpowered if it is connected serially to a powered device.
  • Motor LEDs (5): Motors 1 and 2 each have two indicator LEDs—one red, one green—tied directly to the motor outputs. These LEDs are located on the bottom (motor-driver) board and can be viewed through holes in the top board. For a given motor, the color of the illuminated LED indicates its direction and the intensity indicates its speed. Our convention is to consider the direction indicated by the green LED “forward” and the direction indicated by the red LED “reverse”. The auxiliary motor output is directly tied to the yellow LED on the lower edge of the top (control) board near the auxiliary motor port; the intensity of this LED indicates the auxiliary motor speed.
  • Status LEDs (2): The TReX has two status LEDs—one red and one green—located on the left side of the top board. These LEDs are used to communicate a great deal of information to the user. The illumination patterns mean different things depending on the TReX’s state.
    • On TReX Startup:
      • Status LEDs flash rapidly five times: When the TReX starts up, it signals which channels it has learned by flashing its status LEDs five times. A green flash indicates the corresponding channel has been learned; a red flash indicates the corresponding channel has not been learned. For example, a flash sequence of “red, red, green, red, green” means only channels 3 and 5 have been learned. If the TReX is in analog mode, it signals which analog channels have been learned; if it is in RC mode, it signals which RC channels have been learned; if it is in serial mode, the learned-channel signals are for the mode selected by the “channel input source” parameter (this parameter’s default value is RC mode).
      • Red and green LEDs blink in unison around once per second: The TReX is waiting to see if it should enter learning mode. This happens when the TReX is in RC or analog mode, the mix jumper is in place, and the serial out (SO) pin is grounded. This last condition can arise if the TReX is connected serially to an unpowered microcontroller. Ungrounding the SO pin will cause the TReX to startup as normal; removing the mix jumper will put the TReX into learning-mode, at which point it will either start trying to learn the channels or will wait for a valid signal on the input lines. If it waits, it will flash the red and green LEDs in unison four times faster while waiting.
      • Red and green LEDs alternate around once per second: The TReX is waiting to see if it should enter firmware-upgrade mode. This happens when the TReX is in serial mode (i.e. there is no mode jumper in place), the mix jumper is in place, and the serial out (SO) pin is grounded. This last condition can arise if the TReX is connected serially to an unpowered microcontroller. Ungrounding the SO pin will cause the TReX to startup as normal; removing the mix jumper will put the TReX into firmware-upgrade mode, which will cause the red and green LEDs to start alternating four times faster.
    • While Running Normally:
      • Red LED on solid, green LED might flicker: The red LED solidly on indicates that serial is in control of the motors (i.e. serial override is active or the TReX is in serial mode). While serial is in control of the motors, the green LED acts as a serial-packet-received indicator. It lights when a command byte is received and stays lit until the last byte of the command packet is received. The flicker rate of the green LED will depend on the baud rate you’re using and the rate at which you’re sending serial commands to the TReX.
      • Green LED on solid, red LED might flicker: The green LED solidly on indicates that the channel inputs are in control of the motors (i.e. the TReX is in RC or analog mode and serial override is not active). While the channel inputs are in control of the motors, the red LED acts as a serial-packet-received indicator. It lights when a command byte is received and stays lit until the last byte of the command packet is received. The flicker rate of the red LED will depend on the baud rate you’re using and the rate at which you’re sending serial commands to the TReX.
      • Green LED is rapidly flashing, red LED might flicker: The TReX will not let the channel inputs start controlling the motors until safe-start conditions are first met (see Section 4.e). Specifically, it is waiting for a valid signal on all required channels, for the motor signals to request no motor movement, and for the serial override signal to not be requesting serial override mode. This state occurs when the TReX first starts running in RC or analog mode, and can be retriggered if an RC signal is ever lost on a required channel. This state will never occur if the TReX is in serial mode. While in this state, the red LED acts as a serial-packet-received indicator as described in the bullet point above.
    • While in Learning Mode (see Section 3.e):
      • Red and green LEDs blinking rapidly in unison: The TReX is in RC mode and it is waiting for a valid RC signal on at least one channel before it begins learning the channel calibration values.
      • Red LED on solid, green LED off: This is the first stage of the learning sequence in which the TReX is attempting to learn the neutral values of each channel. This phase should last around two seconds. Do not touch the RC/analog sticks while the red LED is on or you could cause learning to fail.
      • Status LEDs flash rapidly five times: When the TReX is through learning the neutral values, it will flash the status LEDs five times to indicate which channels had neutrals successfully learned and which channels failed neutral learning. A green flash indicates success for the corresponding channel; a red flash indicates failure. If all five channels fail to learn neutral values, the learning process stops, otherwise it continues to the next phase, which is learning the values of the extremes. Once this last learning phase is complete, the status LEDs will again flash five times to indicate whether the corresponding channel was successfully learned. This final five-flash sequence will repeat until the TReX is reset.
      • Red and green LEDs both on solid: This is the second and final stage of the learning sequence in which the TReX is attempting to learn the maximum and minimum values for each channel. This phase lasts around ten seconds, during which time you should move the control sticks to their extremes. Make sure to hold each channel at each extreme for at least 0.5 seconds.
    • While in Firmware-Upgrade Mode (see Section 6):
      • Red and green LEDs alternate around once per second: The TReX is waiting to see if it should enter firmware-upgrade mode. This happens when the TReX is in serial mode (i.e. there is no mode jumper in place), the mix jumper is in place, and the serial out (SO) pin is grounded. This last condition can arise if the TReX is connected serially to an unpowered microcontroller. Ungrounding the SO pin will cause the TReX to startup as normal; removing the mix jumper will put the TReX into firmware-upgrade mode, which will cause the red and green LEDs to start alternating four times faster.
      • Red and green LEDs alternate around four times per second: The TReX is in firmware-upgrade mode and is waiting for the short between the serial out (SO) pin and ground to be removed.
      • Green LED flashes briefly once per second: The TReX is in firmware-upgrade mode and is waiting for the correct initial serial input sequence. The TReX enters this state when the short between the serial out (SO) pin and ground is removed after the mix jumper has been removed.
      • Red LED flashes: There was a faulty input to the bootloader that has caused the bootloader to revert to waiting for the correct initial serial input sequence. Note: once the firmware upload is complete, the TReX will reboot and the red LED may flash as part of the startup sequence. This is not an indication of a firmware-update error. See the firmware-update section for further details.
      • Green LED rapidly flashes: Everything is proceeding as expected during the firmware upgrade process. Each successfully uploaded data packet causes the green LED to flash.