33 lines
504 B
C
33 lines
504 B
C
|
#ifndef SENSOR_Radar_H
|
||
|
#define SENSOR_Radar_H
|
||
|
|
||
|
#include "sensordata.h"
|
||
|
#include <Homie.h>
|
||
|
|
||
|
|
||
|
|
||
|
class Sensor_Radar
|
||
|
{
|
||
|
|
||
|
private:
|
||
|
HomieNode *sensorNode; //reference to HomieNode
|
||
|
|
||
|
int radarpin;
|
||
|
|
||
|
struct sensordata data; //struct values are changed in setup()
|
||
|
|
||
|
bool init_ok;
|
||
|
public:
|
||
|
Sensor_Radar(int pin);
|
||
|
|
||
|
|
||
|
void init();
|
||
|
void setSettings(unsigned long senddelaymax, unsigned long readdelay);
|
||
|
void advertise(HomieNode& p_sensorNode);
|
||
|
void sensorloop();
|
||
|
|
||
|
};
|
||
|
|
||
|
#endif
|
||
|
|