piTest
piTest is a command line tool with which you can access the process image of your Revolution Pi system. The code for this tool is located on the RevPi base module under /home/pi/demo
.
▷ Log in to the RevPi via a terminal.
▷ Open piTest with the command:piTest
Possible piTest Commands
Command | Usage |
---|---|
-1 | Single output, non-continuous |
-d | List of devices used |
-f | Update firmware |
-g<o>,<b> | Read bit b from offset 0 |
-l | Wait for the driver to reset |
-q* | Only the value, without text, is returned |
-r <var_Name>[<f>] | Read l bytes from offset o. f is an optional parameter for the output format (h = hexadecimal, d = decimal (default), b = binary). |
-R <addr>,<bs> | Reset counters or encoders of a RevPi DIO or RevPi DI. <addr> is the address of the module, <bs> is the bit field to select affected inputs. Example: -R 32.0×0014 resets the counters for inputs I_3 and I_5 of the module at address 32. |
-s <o>,<b>,<0|1> | Set bit b (0-7) from byte offset o with the value 0 or 1 |
-v <var_Name> | Outputs information on a variable, e.g., offset and length |
-w <var_Name>,<v> | Write the value to the variable |
-w <o>,<l>,<v> | Write l bytes from offset o in hexadecimal format with the value v. Length can be 1, 2, or 4. |
-x | Driver reset, corresponds to restarting the piControl process. |