Lyky
Well-Known Member
- Joined
- May 27, 2014
- Messages
- 291
- Solutions
- 8
- Reaction score
- 89
Hi,
Not sure how to approach it, but i would like to request help with adding color of the light for each of the states
enum LightState_t {
LIGHT_STATE_DAY,
LIGHT_STATE_NIGHT,
LIGHT_STATE_SUNSET,
LIGHT_STATE_SUNRISE,
};
static constexpr int32_t LIGHT_LEVEL_DAY = 250;
static constexpr int32_t LIGHT_LEVEL_NIGHT = 40;
static constexpr int32_t SUNSET = 1305;
static constexpr int32_t SUNRISE = 430;
LightState_t lightState = LIGHT_STATE_DAY;
uint8_t lightLevel = LIGHT_LEVEL_DAY;
int32_t lightHour = SUNRISE + (SUNSET - SUNRISE) / 2;
// (1440 minutes/day)/(3600 seconds/day)*10 seconds event interval
int32_t lightHourDelta = 1400 * 10 / 3600;
Would want it to rotate around similar array of colors, rather than just intensity of light.
I appreciate all help,
Regards
Not sure how to approach it, but i would like to request help with adding color of the light for each of the states
enum LightState_t {
LIGHT_STATE_DAY,
LIGHT_STATE_NIGHT,
LIGHT_STATE_SUNSET,
LIGHT_STATE_SUNRISE,
};
static constexpr int32_t LIGHT_LEVEL_DAY = 250;
static constexpr int32_t LIGHT_LEVEL_NIGHT = 40;
static constexpr int32_t SUNSET = 1305;
static constexpr int32_t SUNRISE = 430;
LightState_t lightState = LIGHT_STATE_DAY;
uint8_t lightLevel = LIGHT_LEVEL_DAY;
int32_t lightHour = SUNRISE + (SUNSET - SUNRISE) / 2;
// (1440 minutes/day)/(3600 seconds/day)*10 seconds event interval
int32_t lightHourDelta = 1400 * 10 / 3600;
Would want it to rotate around similar array of colors, rather than just intensity of light.
I appreciate all help,
Regards