| ||||||
Files | |
| file | mindsensors-irdist.h |
Mindsensors DIST-Nx driver. | |
Defines | |
| #define | MSDIST_I2C_ADDR 0x02 |
| #define | MSDIST_CMD 0x41 |
| #define | MSDIST_DIST 0x42 |
| #define | MSDIST_VOLT 0x44 |
| #define | MSDIST_MOD_TYPE 0x50 |
| #define | MSDIST_MINDIST 0x52 |
| #define | MSDIST_MAXDIST 0x54 |
| #define | MSDIST_GP2D12 0x31 |
| #define | MSDIST_GP2D120 0x32 |
| #define | MSDIST_GP2YA21 0x33 |
| #define | MSDIST_GP2YA02 0x34 |
| #define | MSDIST_CUSTOM 0x35 |
Functions | |
| int | MSDISTreadDist (tSensors link, ubyte address=MSDIST_I2C_ADDR) |
| int | MSDISTreadVoltage (tSensors link, ubyte address=MSDIST_I2C_ADDR) |
| int | MSDISTreadMinDist (tSensors link, ubyte address=MSDIST_I2C_ADDR) |
| int | MSDISTreadMaxDist (tSensors link, ubyte address=MSDIST_I2C_ADDR) |
| int | MSDISTreadModuleType (tSensors link, ubyte address=MSDIST_I2C_ADDR) |
| bool | MSDISTsendCmd (tSensors link, byte command, ubyte address=MSDIST_I2C_ADDR) |
Variables | |
| tByteArray | MSDIST_I2CRequest |
| tByteArray | MSDIST_I2CReply |
| bool | MSDISTcalibrated [] = {false, false, false, false} |
DIST-Nx Sensor
| #define MSDIST_CMD 0x41 |
MSDIST command register
Definition at line 46 of file mindsensors-irdist.h.
| #define MSDIST_CUSTOM 0x35 |
Custom IR module
Definition at line 58 of file mindsensors-irdist.h.
| #define MSDIST_DIST 0x42 |
MSDIST distance data
Definition at line 48 of file mindsensors-irdist.h.
| #define MSDIST_GP2D12 0x31 |
Sharp IR module GP2D12
Definition at line 54 of file mindsensors-irdist.h.
| #define MSDIST_GP2D120 0x32 |
Sharp IR module GP2D120
Definition at line 55 of file mindsensors-irdist.h.
| #define MSDIST_GP2YA02 0x34 |
Sharp IR module GP2YA02
Definition at line 57 of file mindsensors-irdist.h.
| #define MSDIST_GP2YA21 0x33 |
Sharp IR module GP2YA21
Definition at line 56 of file mindsensors-irdist.h.
| #define MSDIST_I2C_ADDR 0x02 |
MSDIST I2C device address
Definition at line 44 of file mindsensors-irdist.h.
| #define MSDIST_MAXDIST 0x54 |
MSDIST maximum distance in mm
Definition at line 52 of file mindsensors-irdist.h.
| #define MSDIST_MINDIST 0x52 |
MSDIST minimum distance in mm
Definition at line 51 of file mindsensors-irdist.h.
| #define MSDIST_MOD_TYPE 0x50 |
MSDIST Sharp module type
Definition at line 50 of file mindsensors-irdist.h.
| #define MSDIST_VOLT 0x44 |
MSDIST voltage data
Definition at line 49 of file mindsensors-irdist.h.
| int MSDISTreadDist | ( | tSensors | link, |
| ubyte | address | ||
| ) |
Read the distance from the sensor
| link | the sensor port number |
| address | the I2C address to use, optional, defaults to 0x02 |
Definition at line 78 of file mindsensors-irdist.h.
| int MSDISTreadMaxDist | ( | tSensors | link, |
| ubyte | address | ||
| ) |
Read maximum measuring distance from the sensor
| link | the sensor port number |
| address | the I2C address to use, optional, defaults to 0x02 |
Definition at line 150 of file mindsensors-irdist.h.
| int MSDISTreadMinDist | ( | tSensors | link, |
| ubyte | address | ||
| ) |
Read minumum measuring distance from the sensor
| link | the sensor port number |
| address | the I2C address to use, optional, defaults to 0x02 |
Definition at line 129 of file mindsensors-irdist.h.
| int MSDISTreadModuleType | ( | tSensors | link, |
| ubyte | address | ||
| ) |
Read Sharp IR module type from the sensor
| link | the sensor port number |
| address | the I2C address to use, optional, defaults to 0x02 |
Definition at line 171 of file mindsensors-irdist.h.
| int MSDISTreadVoltage | ( | tSensors | link, |
| ubyte | address | ||
| ) |
Read tilt data from the sensor
| link | the sensor port number |
| address | the I2C address to use, optional, defaults to 0x02 |
Definition at line 108 of file mindsensors-irdist.h.
| bool MSDISTsendCmd | ( | tSensors | link, |
| byte | command, | ||
| ubyte | address | ||
| ) |
Send a command to the sensor
| link | the sensor port number |
| command | the command to be sent |
| address | the I2C address to use, optional, defaults to 0x02 |
Definition at line 192 of file mindsensors-irdist.h.
Array to hold I2C reply data
Definition at line 68 of file mindsensors-irdist.h.
Array to hold I2C command data
Definition at line 67 of file mindsensors-irdist.h.
| bool MSDISTcalibrated[] = {false, false, false, false} |
Has the sensor been calibrated yet?
Definition at line 70 of file mindsensors-irdist.h.
1.7.2