Pimoroni modules documentation

I’m probably missing something obvious but I can’t seem to locate the documentation for all of the ‘baked-in’ modules in the Pimoroni uf2 files. You know, something like the MicroPython docs at MicroPython libraries — MicroPython 1.19.1 documentation.
I tried git cloning the repository and building the modules but there doesn’t seem to be all of the python modules in any obvious form. There are .py files but they are scattered about and many of them are not there as far as I can tell.
What have I missed?
Thanks in advance for the help.

It has been a while since I poked at this, but as far as I understand it the Pimoroni .uf2 file mostly runs on C++, with a layer of Python on top for people who prefer that languge. So, most of the code is actually C++, and the Python examples just call the C++ underneath.

If you looking for the MicroPython documentation, then usually if you go into the Github repo and then micropython/modules/BreakoutYou'reInterestedIn you can find the documentation which is available, e.g. this is the page for the Pico Explorer.

Honestly, some of it is a bit sparse, when the Pico first came out I tried to do some of it myself and merged it back into that repo, but I’ve not had the time to do as much as I want.

Thanks for the reply Shoe, it seems that there isn’t a single point of reference for the Pimoroni micropython modules. I’m a C/C++ programmer by preference but I am teaching a young maker to program and Python seems to be the preferred language for automation and machine learning so I swallowed my pride and got stuck in. Python itself is not too bad once you get past the strange indentation formatting and the odd use of the colon, but it does benefit from a huge library of pre-made modules.
It does seem a pity that Pimoroni haven’t added the final touch and documented the usage of their modules.

Yeah, it is a bit of a shame, but I get the impressino that the software people at Pimoroni have been a bit overwhelmed with the volume of things to manage. Maybe I’ll get around to doing it some day, I find that sort of thing quite satisfying.

Yeah, I have had the same issue looking for the code for the pico wifi pack as I am unable ot get it to work.
Hope this can be resolved soon

@Beevs What version UF2 file are you using? And “what exactly” doesn’t work?

I have one, and last time I ran the scan networks example it worked. Support for other functions, IMHO is a bit lacking though.

I’ve run into the same problem and have had some luck with digging round the non-Pico versions of the Python modules and examples where there have been gaps.

I can’t vouch for every module having the same interface, and there may be Python libraries used that aren’t in MicroPython but have managed to find what I’ve needed so far…

Andy

I have also tried looking at the C/C++ code to try to determine the calling protocol but it is almost impossible without an understanding of how the compiled module interfaces to the Python interpreter code. How are you supposed to know what the calling parameters are? Some are fairly obvious. like -

void PicoGraphics::circle(const Point &p, int32_t radius)

Others not so -
void PicoGraphics::polygon(const std::vector &points)

which requires more digging to figure out how to call it in MicroPython.
It is possible to work most of them out, but given that Python is supposed to be THE language that is for beginners it’s hard to imagine them ploughing through the C/C++ code.

Personally I’m only looking at Python code, for example I am currently playing with the rv3028 RTC and in the MicroPython examples there are only examples for setting and getting the time, in the full-fat module examples there are examples for setting alarms and countdown timers as well.

Andy

I am using pimoroni-picow-v1.19.6-micropython.uf2 on a Pico W and running scan_networks.py from the examples provided. Which is giving the error “ImportError: no module named ‘picowireless’”.
I’m just trying to get the example to work, to get my head around whats going on and to learn how to use the wireless pack as I was planning a project that could require 2 network connections.
My guess is that this is something I’m am doing wrong, or something like the module is no longer included in the UF2 file (as the Pico W has Wifi) but without being able to see the code for the UF2 file I cant be sure as yet. Which is why being able to see the code for the UF2 file would help with trouble shooting issues.
I am guessing I might come accross issues running both at the same time (shared pins or the like). So having the Python code available would help as I dont know enough about C/C++ as yet

That example is for the Pico Wireless Pack, not the Pico W.
Try this code. I’m using it with Pimoroni’s 1.19.7 Pico W uf2.

import network
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
networks = wlan.scan()

print("{} networks found:\n".format(len(networks)))
print ("{:<64} {:<8} {:<6})".format('ssid', 'channel', 'rssi'))
for net in networks:
    print ("{:<64} {:<8} {:<6}".format(net[0].decode(), net[2], net[3]))

Thank you for the help, is that code from an example or your own?
I am trying to use the Pico Wireless Pack on a PicoW. If there is some way to do it, I need to get both the ESP and the Pico’s Wifi working together at the same time? Knowing if the picowireless module is included in the UF2 file would help. My guess is that it would have been removed as the Pico W has wifi so not needed as much. Access to all the files may allow this to be added back into my own project as I understand that not many people will need it.
Sorry it was not clear.

It’s not my code,
Pico W Scan Networks, looking for Micro Python code - Support - Pimoroni Buccaneers

I have a couple of WIFI packs. I haven’t done anything with them other than run the demo to make sure they were functional. I had pin conflicts with other hardware I wanted to use with them so put them aside. The Pico W is the planed replacement as its WIFI module is wired up internally. That’s the plan anyway. I’m going to try and do some tinkering with my Pico W’s over the weekend. The above code was for doing a quick test of the WIFI part.

The WIFI Pack library is likely included in the Pico uf2, but then you likely won’t have the Pico W library? Starting a new thread with more detailed info on what your trying to accomplish may be the way to go. You’ll get more views based on the thread title.

Thank you again for your help. My main reply was more to say I had same issue as the original post and hope that it is available at some point.

Hi Chris - just checking you’ve found the MicroPython-flavoured PicoGraphics documentation?