2016-05-02 10:56:15 +02:00
|
|
|
#ifndef SensorBH1750_H
|
|
|
|
|
#define SensorBH1750_H
|
2016-02-01 17:52:17 +01:00
|
|
|
|
2016-02-24 21:51:16 +01:00
|
|
|
#include <Wire.h>
|
|
|
|
|
#include "HalInterfaces.h"
|
|
|
|
|
|
2016-02-01 17:52:17 +01:00
|
|
|
|
2016-07-08 22:14:23 +02:00
|
|
|
class SensorBH1750 : public SensorLight{
|
2016-02-24 21:51:16 +01:00
|
|
|
public:
|
|
|
|
|
virtual void setup();
|
2016-05-10 16:04:39 +02:00
|
|
|
virtual void read(LightData& data);
|
2016-02-01 17:52:17 +01:00
|
|
|
|
2016-02-24 21:51:16 +01:00
|
|
|
private:
|
|
|
|
|
unsigned int pulses;
|
2016-05-10 16:04:39 +02:00
|
|
|
|
|
|
|
|
void configure(uint8_t mode);
|
2016-02-01 17:52:17 +01:00
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
2016-05-02 10:56:15 +02:00
|
|
|
#endif // SensorBH1750_H
|
2016-02-01 17:52:17 +01:00
|
|
|
|