Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can be used on Raspberry Pi Pico (RP2040) ? #2

Open
barban-dev opened this issue Jun 2, 2021 · 4 comments
Open

Can be used on Raspberry Pi Pico (RP2040) ? #2

barban-dev opened this issue Jun 2, 2021 · 4 comments

Comments

@barban-dev
Copy link

Thank you so much for your lib: I was wondering if it can be used on Raspberry Pi Pico (RP2040) with MicroPython.
Has anyone already tried ?
Best regards

@barban-dev barban-dev changed the title Can be used on Raspberry Pi Pico (RP2040) Can be used on Raspberry Pi Pico (RP2040) ? Jun 2, 2021
@sasilva1998
Copy link
Member

To be compatible it needs to have the corresponding modules, including threading, machine, struct and uioat least, otherwise it won't work.

Sadly I don't have a raspberry pico to test it. If you make it compatible, feel comfortable to make a pull request.

@kneave
Copy link

kneave commented Jan 24, 2024

I've been working to migrate my robot to use an RP2040 based board, the Pimoroni Yukon. There are two lines that need to be changed for it to work at a basic level, I've not got the whole thing working with other message types than the ColorMsg example yet though.

Lines 17 and 63 in core.py:
if sys.platform == "esp32":

need to be changed to:
if (sys.platform == "esp32") or (sys.platform == "rp2"):

The RP2040 uses the same _thread library as the ESP32 it seems. Once I've got my robot up and running I'll raise a PR for this, I want to make sure I've found more of the quirks before submitting but thought this may be useful if anyone stumbles across it in the mean time.

@kneave
Copy link

kneave commented Jan 27, 2024

I've sadly given up on this, I need something to work quickly and there are a few too many incompatibilities that I've no idea to fix.

So having given up to write my own thing I hit a bunch of problems I realised this has already solved, rather than figuring out how to solve them in my code I've revisited this and got it working. It seems I actually had it working before but just misunderstood how the MD5 hash generation worked.

It sounds obvious but the Msg files need to match exactly, as the msg files included as examples didn't have comments I manually removed the comments from mine as I mistakenly believed comments were ignored. A bad assumption on my part! I haven't got more complex messages working yet, like anything with a header, but slowly working through it all.

@kneave
Copy link

kneave commented Feb 1, 2024

Another update in case anyone ends up here and hits a similar problem. It turns out the ROS message generator does ignore comments for md5 generation but the message generator here doesn't, not yet anyhow...

Just make sure you manually remove comments before uploading to your MCU and you should be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants