Closed yurysvirida closed 6 years ago
Hi,
How to send sensor properly to sleep ? Before I changed write8 as public and it did the trick. But new version cannot figure out how to do.
public: BH1750(); void begin(uint8_t mode = BH1750_CONTINUOUS_HIGH_RES_MODE); void configure(uint8_t mode); uint16_t readLightLevel(void);
//private: void write8(uint8_t data);
};
in the actual code I did put this:
lightMeter.write8(BH1750_POWER_DOWN);
it was working.
Lib is great, thanks!
change the mode from CONTINUOUS_XXX_RES_MODE to ONE_TIME_XXX_RES_MODE the sensor goes to sleep after a measurement. There is no direct method to force sleep down
Yes. Thanks. checked it, sleeps ok.
Hi,
How to send sensor properly to sleep ? Before I changed write8 as public and it did the trick. But new version cannot figure out how to do.
public: BH1750(); void begin(uint8_t mode = BH1750_CONTINUOUS_HIGH_RES_MODE); void configure(uint8_t mode); uint16_t readLightLevel(void);
//private: void write8(uint8_t data);
};
in the actual code I did put this:
lightMeter.write8(BH1750_POWER_DOWN);
it was working.
Lib is great, thanks!