|
Files | |
file | hitechnic-pir.h |
HiTechnic PIR Sensor Driver. | |
Defines | |
#define | HTPIR_I2C_ADDR 0x02 |
#define | HTPIR_DEADBAND 0x41 |
#define | HTPIR_READING 0x42 |
#define | HTPIR_DEFAULT_DEADBAND 12 |
Functions | |
bool | HTPIRsetDeadband (tSensors link, int deadband) |
int | HTPIRreadSensor (tSensors link) |
int | HTPIRreadSensor (tMUXSensor muxsensor) |
Variables | |
tConfigParams | HTPIR_config = {HTSMUX_CHAN_I2C, 1, 0x02, 0x42} |
tByteArray | HTPIR_I2CRequest |
tByteArray | HTPIR_I2CReply |
HiTechnic PIR Sensor
#define HTPIR_DEADBAND 0x41 |
HTPIR Mode control
Definition at line 38 of file hitechnic-pir.h.
#define HTPIR_DEFAULT_DEADBAND 12 |
Definition at line 41 of file hitechnic-pir.h.
#define HTPIR_I2C_ADDR 0x02 |
HTPIR I2C device address
Definition at line 37 of file hitechnic-pir.h.
#define HTPIR_READING 0x42 |
HTPIR Heading Upper bits
Definition at line 39 of file hitechnic-pir.h.
int HTPIRreadSensor | ( | tSensors | link ) |
Read the current levels detected by the sensor
link | the HTPIR port number |
Definition at line 88 of file hitechnic-pir.h.
int HTPIRreadSensor | ( | tMUXSensor | muxsensor ) |
Read the current levels detected by the sensor
muxsensor | the SMUX sensor port number |
Definition at line 107 of file hitechnic-pir.h.
bool HTPIRsetDeadband | ( | tSensors | link, |
int | deadband | ||
) |
The sensor element with the PIR sensor generates continuous noise. The size of the deadband is set to minimize the number of false detections which will be reported by the sensor. If the deadband value is too small, some of the noise fluctuations will exceed the deadband threshold and will appear as actual non-zero readings.
The Deadband field may be set from 0 to 47 to define the half width of the deadband. The default value is 12.
link | the HTPIR port number |
deadband | the amount |
Definition at line 68 of file hitechnic-pir.h.
tConfigParams HTPIR_config = {HTSMUX_CHAN_I2C, 1, 0x02, 0x42} |
Array to hold SMUX config data for sensor
Definition at line 49 of file hitechnic-pir.h.
Array to hold I2C reply data
Definition at line 53 of file hitechnic-pir.h.
Array to hold I2C command data
Definition at line 52 of file hitechnic-pir.h.