# Nano RP2040 Connect Micropython Timers

**URL:** <https://forums.openmv.io/t/nano-rp2040-connect-micropython-timers/7482>\
**Category:** Arduino Boards\
**Created:** [September 7, 2022, 12:50pm UTC](https://forums.openmv.io/t/nano-rp2040-connect-micropython-timers/7482 "2022-09-07T12:50:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvaroav](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@alvaroav](https://forums.openmv.io/u/alvaroav)\
**Post date:** [September 7, 2022, 12:50pm UTC](https://forums.openmv.io/t/nano-rp2040-connect-micropython-timers/7482/1 "2022-09-07T12:50:05Z")

</div>

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:

```auto
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 1.19.1 documentation](https://docs.micropython.org/en/latest/rp2/quickref.html) since it is not a specific one for Arduino boards

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [September 7, 2022, 12:51pm UTC](https://forums.openmv.io/t/nano-rp2040-connect-micropython-timers/7482/2 "2022-09-07T12:51:00Z")

</div>

How did you load the firmware? With our IDE?

---

<div class="post-metadata">

**Author:** ![alvaroav](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@alvaroav](https://forums.openmv.io/u/alvaroav)\
**Post date:** [September 29, 2022, 9:30am UTC](https://forums.openmv.io/t/nano-rp2040-connect-micropython-timers/7482/3 "2022-09-29T09:30:31Z")

</div>

With the OpenMV tool

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [September 29, 2022, 9:42pm UTC](https://forums.openmv.io/t/nano-rp2040-connect-micropython-timers/7482/4 "2022-09-29T21:42:19Z")

</div>

Can you try the same code with MicroPython firmware here:

> **[MicroPython - Python for microcontrollers](https://micropython.org/download/ARDUINO_NANO_RP2040_CONNECT/)**
>
> MicroPython is a lean and efficient
> implementation of the Python 3 programming language
> that includes a small subset of the Python standard library and is
> optimised to run on microcontrollers and in constrained environments.

If it works, I will look into it, if not you should post on MicroPython github discussions or report an issue there, or find code that works for rp2 port.
