diff --git a/main.c b/main.c index 37babd9..b9ce764 100644 --- a/main.c +++ b/main.c @@ -52,12 +52,13 @@ volatile bool time_flag = false; /**< flag set when time changed */ volatile bool photoresistor_flag = false; /**< flag set when ambient luminosity is measured */ /** @} */ -#define TICKS_PER_SECOND 256 /**< the number of ticks in one second */ /** @defgroup main_ticks ticks per time units * @note these are derived from TICKS_PER_SECOND * @note I have to use type variables because defines would be stored in signed integers, leading to an overflow it later calculations * @{ */ +/** the number of ticks in one second (depend on the number of LED since it tries to have 255 tick per LED per second) */ +#define TICKS_PER_SECOND 256*WS2812B_LEDS/60 /** number of ticks in one second */ const uint32_t ticks_second = TICKS_PER_SECOND; /** number of ticks in one minute */