DO THIS to connect two Picos together - to Pico Communication via UART
HTML-код
- Опубликовано: 10 сен 2024
- Do you want to know how to connect two Raspberry Pi Pico's together using UART/Serial? This will work on any pair of MicroPython devices.
UART communication can be a bit fiddley, the new library used in this video will make this much easier. I'll show two simple demos, one that passes messages between the two picos, and another that will control the LEDs on both Picos, using a JSON payload.
Join this channel to get access to perks:
/ @kevinmcaleer28
💁♂️ For more information on SMARS Robots, tutorials and more visit: www.smarsfan.com
🎖To join the membership at 🥉bronze, 🥈silver or 🥇gold levels, head over to
www.smarsfan.c...
Join the list - action.smarsfa...
☕️ Enjoy this video? Buy me a coffee! www.buymeacoff...
📸 Follow me on Instagram - @kevinmcaleer / kevinmcaleer
🐦 Follow me on Twitter - @kevsmac / kevsmac
🙂📘 Join the Facebook group - Small Robots / smallrobots
👩💻 Easy_comms code on GitHub: www.github.com...
🎵 Music by Epidemic Sounds www.epidemicso...
#Pico #MicroPython #Robotics
Thanks for putting this code and demo together. Note that there's a problem if anyone sends a character that encodes to 2 bytes of utf-8, because the reader will call decode() on the first byte received, and probably generate an exception. You can only decode the utf-8 character when you have both bytes. So it might be better to leave the decode until you have the whole message. There is still the problem that '
' might then be detected early, matching with one of the 2 bytes. You might use _decode('utf-8', 'replace')_ to avoid exceptions.
That was really cool to call out the LED alias / Pin 25 difference between the Pico W and the Pico in your last example. I was scratching my head for a while when I started playing with the Pico W and used an earlier blink example. Great demo! Thank you.
Thanks for the video Kevin! Really fantastic that you are sharing this with all of us. Big time saver for those that need to do this.
Great video. I've been thinking about playing around with something like this for a while but haven't had a use for it yet. I can see that it is way easier than I thought it was going to be, thanks.
Great! You always make me smile! I was actually looking for this (well, sort of). It got my brain working! :)
Thanks Johan!
🍓 Many thanks! 👍 I will definitely have a nice project which can use this in the near future 😁
Hi thanks a lot for the video! I would love to see a sequel where you daisy chain, say 4 or 5 boards and demonstrate how each board would receive and process only the instructions it is meant to process. And all boards would be able to send feedback about the process result back to one main board that keeps track of each boards results.🤩
This is how the first networking worked - AppleTalk/Localtalk on the Macintosh used a serial connection and a single cable to connect a series of computers together in this way.
Great video, I am planning to build a RP2040 board with two RP2040 chips on it, hope to use one as a real time data collector, and the other to write the data to a SD card. I think this will help me in this goal.
It would be helpful also if you had a clearer pinout diagram like Fritzing to show how to connect it. Your verbal description was spot on but some folks might get lost :)
Thanks Steven, great idea on using fritizing for wiring diagrams.
Thank you so much for this! It's exactly what I was looking for!
I want to use this to connect several Cosmic Unicorns together but they only have Qw/ST connectors... can I daisy chain those Qw/ST connectors together and use this code?
Hello Kevin
Thank you very much for your many interesting videos! I learn a lot from you.
Could you give me some advice. I need to make 2 Pico communicate.
However, on the Pico receiver, Pin 1 and 2 are already used.
How can I modify your code to use Pin 21 (GP16) and 22 (GP17) where TX0 and RX0 seem to be available too?
Thank you for your help!
2 but the're 5 sets of them when u look at the pinout [1,2],[6,7],[11,12],[16,17],[21,22] tho i do see it says uart1 and uart 2 on each of them but if thats what yr refering to how do u choose between the different sets of pins if u wanna use different set or more than 1?
Q: Thank you for this nice video. Is it somewhere possible to download the code? Thank you in advanced.
Sure - (its in the video description) - 👩💻 Easy_comms code on GitHub: www.github.com/kevinmcaleer/easy_comms
Hi, its a bit beyond me
Sure Kurien, this is for people who are searching out how to do this, as its a commonly asked question.
Hi Kevin , can you use this method to receive video from esp32cam to pico ?
You can but remember the Pico only has 264k or ram which isn’t enough to hold a single frame of colour video let alone a live stream. So it depends what your going to do with the video, at a push you could write it out to a file or pass it onto another device a couple of bytes at a time.
@@kevinmcaleer28 good point ! I forgot about the ram limitation, I wanted to do FPV smars but Esp32 alone is really limited so that’s why I wanted to pair it with pico , maybe I could use another Esp32