Error building pimoroni-pico cmake file

I’m following the readme and directions on:

On trying to build the example files, I have this error:
CMake Error at pico_sdk_import.cmake:54 (message):
Directory ‘/path/to/pico-sdk’ not found
Call Stack (most recent call first):
CMakeLists.txt:4 (include)

I’m on OSX 12.7.1

What I’d really like is just a micropython .py file for each breakout. I ended up manually re-writing and converting everything for the scd41, pa1010d, icp10125 and the 5x5 rgb matrix myself. I really don’t want to spend hours figuring out each thing myself so is someone able to just upload a dump of all the micropython .py files?

Have you installed the Pico SDK?

That’s saying CMake can’t find the SDK (although I don’t quite understand why it’s trying /path/to/pico-sdk, are there messages before that error?); from memory as long as the SDK is somewhere “obvious” (i.e. in the same folder as pimoroni-pico) it should just find it.

That said, I’m not sure exactly what you’re trying to get from the build; things like the scd41 breakout looks to be implemented in C with some micropython bindings so there isn’t really a “.py file” - it’s built into the pimoroni-pico micropython firmware?

1 Like

You might just try vanilla MicroPython for the Pico. Not the Pimoroni-version. They integrate everything into their build, which does have some merits, but it makes many things very complicated. With vanilly MicroPython, you need to download specific drivers (in python) to your lib-directory, and that is it. Searching and finding relevant MicroPython drivers for your hardware may be an issue. But as long as you have generic hardware (like the scd41), that should be no problem. With very specific Pimoroni-hardware, that is different.

1 Like

I see… I’ve been finding python code and re-writing them. This is what I’ve done so far:

I installed the sdk - followed the instructions from the start.

I didn’t realise it’s an integrated firmware build which isn’t what I want. I want to use the vanilla MicroPython for the Pico with micropython libraries. So if this is the case, I have to continue re-writing everything!

Yeah unfortunately Pimoroni decided to cde everything in C, and then the MicroPython code just calls the C code as far as I’m aware, so they don’t have complete Micropython code for the breakouts. Most of the hardware they use is fairly common though, so there should be code to work off out there.

1 Like

Another option is to switch to CircuitPython. There are more than 400 libs available, and also a very simple tool to download and install necessary libs. The tool parses your code and automatically downloads and installs everything you reference. No need to rewrite anything (except if your specific hardware is not covered by the available codebase).

1 Like

OH! I had a very quick look around and it seems that this could be a viable solution! I’ll explore more over the next couple of weeks. Thank you!!