Has anyone tried interfacing Raspberry Pi (Zero 2 W) with LEGO Spike Prime via UART? #2743
-
|
Hi everyone, I am in the planning stage of an autonomous robotics project and I would like to seek advice from the community on a specific architecture I’m considering. The concept: I have a few questions for those who might have done something similar: Has anyone successfully implemented a setup where a Raspberry Pi acts as a "vision brain" for a Spike Prime Hub using UART for communication? I know there are a few projects with uart cable connection, but I want to ask your opinion whether this is a good solution. I haven't started building the robot yet, so I want to make sure this architecture is solid before I start soldering and assembling. Any tips, links to projects, or general advice would be greatly appreciated! Thanks in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
I think there have been plenty of people that have done it with a microcontroller, like an ESP32. Probably not so much with something running Linux, like an RPi Zero 2W. Should work just fine though. There is a generic UART class for this sort of thing: https://docs.pybricks.com/en/stable/iodevices/uartdevice.html If you want a really simple way to start though, you could use https://pybricks.com/learn/smart-sensors/getting-started/. Assuming you can run the Chromium web browser on the RPi Zero 2W, it should just work. Then for fun, you could implement the same protocol on your own and replace the web browser with OpenCV. |
Beta Was this translation helpful? Give feedback.
I think there have been plenty of people that have done it with a microcontroller, like an ESP32. Probably not so much with something running Linux, like an RPi Zero 2W. Should work just fine though.
There is a generic UART class for this sort of thing: https://docs.pybricks.com/en/stable/iodevices/uartdevice.html
If you want a really simple way to start though, you could use https://pybricks.com/learn/smart-sensors/getting-started/. Assuming you can run the Chromium web browser on the RPi Zero 2W, it should just work. Then for fun, you could implement the same protocol on your own and replace the web browser with OpenCV.