Hello,
I want to use timer with my app. I want to make led on my beacon flash for 1 second when it recieves a value. How can i set timer to turn of led after 1 sec?
I'm using dual mode example, with RTC timer.
Hello,
I want to use timer with my app. I want to make led on my beacon flash for 1 second when it recieves a value. How can i set timer to turn of led after 1 sec?
I'm using dual mode example, with RTC timer.
your function should look like this
static void ledice (void)
{
rtc1_timeout_set_ms(500);
LEDS_ON(BSP_LED_0_MASK);
while (!rtc1_timeout()) { }
LEDS_OFF(BSP_LED_0_MASK);
}
I think LEDS_ON will turn the led off, you can try to reverse the order in that case, you will notice that when the LED is off for 500 ms and then switches ON and stays ON
Ah yes. Works great when you changle LEDS_ON with LEDS_OFF and the other way around :)
Thank you very much for all your help today.
Best regards.
Ah yes. Works great when you changle LEDS_ON with LEDS_OFF and the other way around :)
Thank you very much for all your help today.
Best regards.