You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
654 B
36 lines
654 B
#ifndef SENSOR_VL53L1X_H |
|
#define SENSOR_VL53L1X_H |
|
|
|
#include "sensordata.h" |
|
#include <Homie.h> |
|
|
|
|
|
#include <Wire.h> |
|
#include <VL53L1X.h> |
|
|
|
class Sensor_VL53L1X |
|
{ |
|
|
|
private: |
|
VL53L1X *vl53l1x; |
|
HomieNode *sensorNode; //reference to HomieNode |
|
|
|
struct sensordata data; //struct values are changed in setup() |
|
|
|
bool init_ok; |
|
|
|
unsigned long lastread_vl53l1x=0; |
|
VL53L1X::RangeStatus lastsentvalue_vl53l1x_status; |
|
|
|
public: |
|
Sensor_VL53L1X(); |
|
|
|
void init(); |
|
void setSettings(float minchange, unsigned long senddelaymax, unsigned long readdelay); |
|
void advertise(HomieNode& p_sensorNode); |
|
void sensorloop(); |
|
|
|
}; |
|
|
|
#endif |
|
|
|
|