40 #define CHILD_ID_LIGHT 0
41 #define LIGHT_SENSOR_ANALOG_PIN 0
43 uint32_t SLEEP_TIME = 30000;
45 MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL);
55 present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
60 int16_t lightLevel = (1023-analogRead(LIGHT_SENSOR_ANALOG_PIN))/10.23;
61 Serial.println(lightLevel);
62 if (lightLevel != lastLightLevel) {
64 lastLightLevel = lightLevel;