0

I am verry new to Pico and I want to understand something. This is just a microcontroler, not a mini computer like RPi 4. From what I study so far, they say that it has a 125 MHz fixed clock and it doesn't lower the clock frequency when idle, like RPi 4 does when I execute a time.sleep() function and is idle. What should I do in Pico when my MicroPython script got nothing to do and waits for something from the user ? Should I make an infinite loop while True: pass or should I call the time.sleep() too ? I mean, is there a difference between them in terms of power consumption ? Will the Pico runs hoter in the infinite loop ? I don't want to put the Pico in low power mode, because I need it to be active and ready to take commands. But sometimes it got nothing to do...

1
  • There are several techniques available for reducing the Pico's power consumption when idle. What have you tried searching so far - perhaps in the "Official Documentation"???
    – Seamus
    Dec 18, 2023 at 18:06

1 Answer 1

0

This Question is unanswerable because you haven't said what you are trying to do (or what you are attempting to achieve).

The simple answer is it depends - choosing an appropriate algorithm is the art of computer programming.

If you are waiting for a single input - use a blocking command and let the compiler do the work.

In general idle loops are poor practice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.