
8. Variable reference
The Motoron maintains a set of variables in RAM that contain information about its inputs, outputs, and
status. The Motoron’s “Get variable” command allows you to read the variables, and there are other
commands that allow you to set or modify the variables.
The variables are divided into two categories:
•
General
variables apply to all the motors, or the controller as a whole. The Motoron just
stores one copy of each general variable.
•
Motor-specific
variables can be different for each motor. The Motoron stores a separate
copy of the variable for each motor, and you must provide a motor number when accessing
the variable.
This section lists all of the variables that the Motoron supports. In addition to the category, this section
contains several pieces of information for each variable, if applicable:
• The
Offset
of each variable is its location among the variables in the same category. The
offset is measured in bytes.
• The
Type
specifies how many bits the variable occupies, and says whether it is signed or
unsigned.
• The
Range
specifies what values the variable can have.
• The
Default
specifies the value that the variable has when the controller starts up, before it
has been modified.
• The
Units
specify the relationship between values of the variable and real-world quantities.
• The
Data
indicates how to interpret different possible values of the variable.
• The
Command
is the name of a command that can be used to set the variable.
• The
Arduino library
field shows the methods in the Arduino library that can be used to
access the variable.
The term “bit 0” refers to the least significant bit of a variable (the bit that contributes a value of 1
to the variable when it is set). Accordingly, the other bits of a variable are numbered in order from
least significant to most significant. All variables use little-endian byte ordering, meaning that the least-
significant byte comes first.
List of variables
•
•
Pololu Motoron Motor Controller User’s Guide
© 2001–2022 Pololu Corporation
8. Variable reference
Page 32 of 67