Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Machine.Timer not working while connected to MicroPico, Pi Pico W #278

Open
timgenium opened this issue Jan 22, 2025 · 0 comments
Open

Machine.Timer not working while connected to MicroPico, Pi Pico W #278

timgenium opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@timgenium
Copy link

Please provide a clear and concise description of the bug along with logs

When trying to setup a timer to run on a Pi Pico W, the Machine.Timer module appears to be broken, and the callback function is never called whilst using this extension.
The code functions perfectly using a different software to program the device (I.e. Thonny).

What are the steps to reproduce this issue?

  1. Using latest Micropython Firmware on a Raspberry Pi Pico W, alongside latest version of MicroPico extension.
  2. Try to run the following code on the pico.
from machine import Timer

tim = Timer()


def interrupt_func(t):
    print('got here')


tim.init(freq=1, mode=Timer.PERIODIC, callback=interrupt_func)

What happens?

Nothing happens

What were you expecting to happen?

The timer should call the function interrupt_func once a second, printing "got here" to the vREPL.

Any other comments?

Which version of MicroPico are you using?

Latest (4.2.1)

Support info

Version: 1.96.0 (system setup)
Commit: 138f619c86f1199955d53b4166bef66ef252935c
Date: 2024-12-11T02:29:09.626Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.26100
@timgenium timgenium added the bug Something isn't working label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant