DIST: this class provides functions for DISTNx from mindsensors.com for read and write operations.
More...
DIST: this class provides functions for DISTNx from mindsensors.com for read and write operations.
| def mindsensors.DIST.__init__ |
( |
|
self, |
|
|
|
dist_address = DIST_ADDRESS |
|
) |
| |
Initialize the class with the i2c address of your Dist-Nx.
- Parameters
-
| self | The object pointer. |
| dist_address | Address of your Dist-Nx. |
| def mindsensors.DIST.command |
( |
|
self, |
|
|
|
command |
|
) |
| |
Writes a value to the command register.
- Parameters
-
| self | The object pointer. |
| command | Value to write to the command register. |
| def mindsensors.DIST.get_distance |
( |
|
self | ) |
|
Reads the distance in millimeters.
- Parameters
-
| def mindsensors.DIST.get_distance_inches |
( |
|
self | ) |
|
Reads the distance in inches.
- Parameters
-
| def mindsensors.DIST.get_voltage |
( |
|
self | ) |
|
Reads the voltage of the Dist-Nx.
- Parameters
-
| int mindsensors.DIST.DISTANCE = 0x42 |
|
static |
Distance Register.
Will return an integer value
| int mindsensors.DIST.VOLTAGE = 0x44 |
|
static |
Voltage Register.
Will return an integer value
The documentation for this class was generated from the following file:
- PiStorms/sys/mindsensors.py