Hi,
I am using SDK 15.3 and NRF52840 Preview DK
I have a requirement where I have to glow one of 3 LEDs R-G-B (each connected to one gpio pin) for 1 second and turn it off for 29 seconds, which LED will lit up depends on a variable(eg. rgb) in my code, suppose if
rgb == 1 -- RED
rgb == 2 -- GREEN
rgb == 4 -- BLUE
some of my approaches are
using a timer with 1 second timeout and then using a counter and flag for turning ON and OFF the LED
and the other is using two timers one to toggle led ON after 29 seconds and one timer to turn OFF led after 1 second.
which of the two approaches are better in terms of power consumption and are there any better approaches ?