Nano RP2040 Connect Micropython Timers

Dear all,

I am trying to build a very simple code to swith ON and OFF the led based on a timer interrupt with VisualMS.
I have it working with the blinking example shown on the OpenMS examples folder, but when trying to set up the same functionality with a machine.Timer, with this definition:

callback_timer = Timer(period = 500, mode=Timer.PERIODIC, callback=toggle_led(0))
callback_timer.init()

The timer just enters into toggle_led once, like Timer.ONE_SHOT

Can you help me to do it periodic? or someone knows if this is enabled with Nano Connect RP2040.

I am following this quickref Quick reference for the RP2 — MicroPython latest documentation since it is not a specific one for Arduino boards

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.