
TETRIX MAX DC Motor Expansion Controller Arduino Library Functions Chart
Please be sure to download and install the latest version of the TETRIX PRIZM Arduino Library for the most up-to-date
programming features and functionality.
All the DC motor control functions that implement PID control require encoder input data. For these functions to execute
accurately, the motor encoder must be a TETRIX type or one that matches the TETRIX motor encoder specification. Please
refer to the TETRIX TorqueNADO motor specifications table at Pitsco.com/TETRIX-MAX-TorqueNADO-Motor-with-
Encoder#resources for the motor and encoder technical parameters. The examples in the Coding Example column are
shown for the controller ID# set to 1. The ID# must match the controller or controllers’ ID# for proper communication.
Unless changed, the DC motor expansion controller’s default ID# is 1. The first parameter in the function is always the
controller ID#.
Description Function Coding Example (for controller ID = 1)
Read DC Controller Firmware
Version
Reads the version number of firmware.
readDCFirmware(ID#);
Data Type:
ID# = integer
Data Type Returned:
Unsigned integer
readDCFirmware(1);
Return the DC motor controller’s firmware
version.
Set/Change Expansion Controller ID
Number
Sets/changes the unique i2C ID
address of the expansion controller.
setExpID(ID#);
Data Type:
ID# = integer
setExpID(3);
Set the ID of the connected expansion
controller to “3.”
Important: Only the controller that is
being changed can be connected to the
i2C bus when calling this function.
Read the Expansion Controller ID
Number
Reads the i2C address/ID of the
expansion controller.
readExpID();
Data Type: None
Data Type Returned:
value = integer
readExpID();
Return the i2C address/ID of the
connected expansion controller.
Important: Only the controller that is
being read can be connected to the i2C
bus when calling this function.
Watchdog Timer Time-Out
Forces a watchdog timer reset of the
expansion controller’s processor.
WDT_STOP(ID#);
Data Type:
ID# = integer
WDT_STOP(1);
Command the expansion controller to do
a processor reset.
Send Controller Enable
Sends an enable byte to the expansion
controller to begin receiving motor
commands.
ControllerEnable(ID#);
Data Type:
ID# = integer
ControllerEnable(1);
Send an enable command byte.
Send Controller Reset
Sends a reset command byte causing
the controller’s firmware to a full reset.
All conditions are set to power-up
defaults after a reset occurs.
ControllerReset(ID#);
Data Type:
ID# = integer
ControllerReset(1);
Send a firmware reset command byte.