DC_Firmware: Sending the command byte 0x26 returns the motor controller firmware version. The value returned is an
unsigned byte.
Set_EXP_ID: Sending the command byte 0x24 followed by an ID byte causes the DC motor expansion controller to change
its i2C address/ID to the value of the ID byte sent. The PRIZM Arduino Library supports up to four controllers in a daisy
chain arrangement with IDs ranging from 1 to 4. By default, the DC motor controller ships with the ID set to 1. Additional
daisy-chained DC motor controllers must be set to a different ID. See the example sketches in the TETRIX PRIZM Arduino
Library examples folder for setting controller IDs. Any change to the i2C address/ID will be effective upon next power-up
of the controller. IDs 0, 5, and 6 may not be used. Important: When calling this function, only the expansion controller that
is being changed can be connected to the PRIZM controller. No other i2C devices may be connected to PRIZM’s expansion
port.
Battery_Voltage: Sending the command byte 0x53 will return two bytes that when assembled into a 16-bit integer value
represent the battery voltage. Actual voltage is the returned value divided by 100. The first byte is the High byte and the
second byte is the Low byte.
WDT_STOP: Sending the command byte 0x23 forces a watchdog timer reset condition of the DC motor controller’s internal
processor. When the command is received, the controller will reset after a 15 ms time-out period. When triggered, all motor
and encoder parameters will be set to their default power-up values.
Controller_Enable: Sending the command byte 0x25 enables the operation of the DC motor controller. The motor
controller must receive an enable command after power-up or a reset in order to receive and execute motor commands.
The enable command is automatically sent by the PrizmBegin function in the PRIZM Arduino Library.
Controller_Reset: Sending the command byte 0x27 signals a firmware reset. All motor channels will be set to 0% power
level and all encoder values reset to 0. A Controller_Enable command will re-enable all channels.
Motor1_Power: Sending the command byte 0x40 puts motor channel 1 in power only mode. The power level data byte
sets the power level percentage of motor channel 1. The motor power level parameter is a signed byte ranging from -100 to
100. Any negative values will run the motor in the reverse direction. A value of 0 will stop the motor in coast mode. A value
of 125 will stop the motor in brake mode.
Motor2_Power: Sending the command byte 0x41 puts motor channel 2 in power only mode. The power level data byte
sets the power level percentage of motor channel 2. The motor power level parameter is a signed byte ranging from -100 to
100. Any negative values will run the motor in the reverse direction. A value of 0 will stop the motor in coast mode. A value
of 125 will stop the motor in brake mode.
Motor_Powers: Sending the command byte 0x42 puts both motor channels in power only mode. Two power level data
bytes set the power level percentage of Motor 1 and Motor 2. Byte 1 sets the power level parameter for Motor 1. Byte 2 sets
the power level parameter for Motor 2. The motor power level parameter is a signed byte ranging from -100 to 100. Any
negative values will run the motor in the reverse direction. A value of 0 will stop the motor in coast mode. A value of 125
will stop the motor in brake mode.
Motor1_Speed: Sending the command byte 0x43 puts the motor channel 1 in constant speed mode. Two data bytes
set the speed parameter in units of degrees per second (DPS) for motor channel 1. The first byte is the High byte and the
second is the Low byte. The motor controller firmware will assemble the two bytes into a 16-bit signed integer with a
range of -32,768 to 32,767. Motor 1 will run at the set speed value in constant speed mode. The speed is governed by a PID
algorithm using encoder input data. Any negative speed values will run the motor in the reverse direction.
Motor2_Speed: Sending the command byte 0x44 puts motor channel 2 in constant speed mode. Two data bytes set the
speed parameter in units of degrees per second (DPS) for motor channel 2. The first byte is the High byte and the second is
the Low byte. The motor controller firmware will assemble the two bytes into a 16-bit signed integer with a range of -32,768
to 32,767. Motor 2 will run at the set speed value in constant speed mode. The speed is governed by a PID algorithm using
encoder input data. Any negative speed values will run the motor in the reverse direction.
Motor_Speeds: Sending the command byte 0x45 puts both motor channels in constant speed mode. Four data bytes set
the speed parameter in units of degrees per second (DPS) for Motor 1 and Motor 2 simultaneously. The first and second
bytes are the High and Low bytes for the Motor 1 speed parameter. The third and fourth bytes are the High and Low bytes
for the Motor 2 speed parameter. The motor controller firmware will assemble the first and second bytes into a 16-bit
signed integer representing the Motor 1 speed parameter. The third and fourth bytes will be assembled into a 16-bit signed
integer representing the Motor 2 speed parameter. Each speed parameter range is -32,768 to 32,767. Both Motors 1 and
2 will run at the set speed values in constant speed mode. The speed is governed by a PID algorithm using encoder input
data. Any negative speed values will run the motor in the reverse direction.
Command Register Functions Descriptions