Scheduling in Micropython

Apologies if this is a stupid question.

I’m trying my first project on a Raspberry Pi Pico. The project is to open and close a door (via a motor) at certain times. I’m using:

I can’t figure out how to schedule the events in Micropython. I have found the following scheduling module:

But I can’t figure out how to import this module into MicroPython on the PICO. I’ve tried typing “pip
install schedule” into the Thonny shell but I get “SyntaxError: invalid syntax”.

I don’t really know where to go from here. Is it possible to import modules into Micropython on the PICO? If so, how would I do it? Or perhaps there is a better way to schedule a function using Micropython?

Any help would be greatly appreciated.

2 Likes

Hey Christopher,

Just working off the top of my head here:

  1. Heading over to GitHub and downloading the files: GitHub - rguillon/schedule: Python job scheduling for humans.
  2. Grab the schedule folder and upload that to your Pico (put the folder in your code directory, then right-click and upload)

Then follow through the steps that Renauld outlined.

I would also have a look at this link here which is what I think he was hinting towards: Getting started with MicroPython on Raspberry Pi Pico: Access the REPL and upload MicroPython libraries using rshell

Liam.

1 Like