Light Lux level data type added
This commit is contained in:
@@ -42,7 +42,8 @@ typedef enum {
|
|||||||
V_DUST_LEVEL, V_VOLTAGE, V_CURRENT,
|
V_DUST_LEVEL, V_VOLTAGE, V_CURRENT,
|
||||||
V_RGB, // Used for sending/receiving color information. Sent as ascii hex. RRGGBB (RR=red, GG=green, BB=blue component)
|
V_RGB, // Used for sending/receiving color information. Sent as ascii hex. RRGGBB (RR=red, GG=green, BB=blue component)
|
||||||
V_RGBW, // Used for sending/receiving color information. Sent as ascii hex. RRGGBBWW (WW=while component)
|
V_RGBW, // Used for sending/receiving color information. Sent as ascii hex. RRGGBBWW (WW=while component)
|
||||||
V_ID // Can be used for reporting ids for sensors such as DS1820b.
|
V_ID, // Can be used for reporting ids for sensors such as DS1820b.
|
||||||
|
V_LIGHT_LEVEL_LUX // Light level in lux
|
||||||
} mysensor_data;
|
} mysensor_data;
|
||||||
|
|
||||||
// Type of internal messages (for internal messages)
|
// Type of internal messages (for internal messages)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ unsigned long SLEEP_TIME = 30000; // Sleep time between reads (in milliseconds)
|
|||||||
|
|
||||||
BH1750 lightSensor;
|
BH1750 lightSensor;
|
||||||
MySensor gw;
|
MySensor gw;
|
||||||
MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL);
|
MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL_LUX);
|
||||||
uint16_t lastlux;
|
uint16_t lastlux;
|
||||||
|
|
||||||
void setup()
|
void setup()
|
||||||
|
|||||||
Reference in New Issue
Block a user