Raspberry Pi Pico W Board Compatability

Hi there! I have been attempting to learn all about SimpleFOC for a few month now, but this will be my first post here.

I am attempting to make the steer by wire project but utilizing 2 Raspberry Pi Pico W boards. I have gotten some simple closed loop velocity tests working on just a plain Pico but when I attempt to compile the example code for a Pico w it fails. Has anyone attempted to use this version of the Pico with simpleFOC? hopefully I was able to get my question across well enough :slight_smile:

Hey, and welcome to SimpleFOC, @cheppy44 !

Regarding the Pico W, it’s on my ToDo list, I have a few of them here to test with.

I wrote the RP2040 support, and based on what I’ve read so far it should be quite possible to use SimpleFOC with the Pi Pico W as well.

My understanding is that they (RPi) aren’t so good with their Arduino support, or Arduino isn’t so interested in supporting them or something… in any case there are problems with the official Arduino core for RP2040, and its stuck on an old framework version.

So AFAICT people are recommending to use an alternative Arduino core for the Pico W, instructions for example here: Pico W with the Arduino IDE | DroneBot Workshop

But I think this alternative core is based on a newer version of the RP2040 SDK, so there may be adjustments you have to make in our code to make it compatible, since we use the SDK calls directly to initialise the PWM and current sensing :-/

It’s all a bit of a mess, and I’m sorry about that. In the end, I am not sure if it will solve more problems or cause more problems if we switch away from the official core for our RP2040 support… I was kind of hoping Arduino/Raspberry would sort it out by now.

Thanks @runger for getting back to me so quickly!

It is a bit of a bummer to hear that the Pico W does not quite work yet. Originally I was using the alternative Arduino core for the Pico and it was running into the issue with the PWM. Do you think there is any hope for the Pico W, or should I look into using a different controller?

This community seems very awesome and I can not wait to learn more about it.

Hey @cheppy44,

I will get to the Pico W, but given the amount of stuff on my desk, I expect it won’t be until next year…

It would also be a great benefit if the official Arduino framework supported it, then there would not be compatibility issues with framework versions…

So for the short term, I’d encourage you to get a different MCU, like the ESP32 if you like WiFi, or the regular Pico if you can do without…

In the medium term, e.g. sometime next year, I hope we can sort it out and support the Pico W “out of the box”…