You explain it all in a really great way! I just realized why I couldn't get UART to work before. UART0 is the same UART that is also used by the USB connection with the computer. So your use of UART1, while connected via USB makes a lot of sense! I'm so glad I figured that out!
hmm, I came to the wrong conclusion. Apparently it can work using UART0. I couldn't connect to the REPL anymore, because Thonny got confused with the 2 picos connected to the same computer
@@Core-Electronics I'm using an extension board from AliExpress. It has RS485 and I tried to use it directly as UART. There is some electronics between GP0/GP1 and B-/A+, which gave some strange results. I'm such a noob at this... Yesterday I connected directly to those pins and it worked like a charm. Learning all the time.
UART is designed to be a one-to-one communication protocol in that you only connect 2 together. However you can technically connect multiple boards. I have had a Pico transmitting data to 3 boards at once (connect the TX of the main board to the 3 RX pins of the others), and I was having no issues receiving messages. However sending information back was a little tricky so I didn't do it.
Thank you for the excellent video. I built your circuit using two Picos and Thonny and it worked perfectly. Question, please: Is it possible to send data - even a single letter or number - from a PC-based Thonny Python program to a Pico with MicroPython using USB? It appears that there isn't a serial module for MicroPython. I can send data from the Pico to my PC using a print statement. Do I have to forget USB and connect with the Pico UART TX and RX inputs with a adapter cable to accomplish this? Thank you and best regards.
That is a bit of a question! Usually when we do this we use a full sized Raspberry Pi computer, it runs Linux and has UART pins that can be used. But using a PC-based method isn't impossible, there is a Python library called Pyserial that allows you to do exactly what you are looking for. It is a little involved though, but long story short you can have your Python script using Pyserial sending commands, and another on the Pico receiving commands. A quick google search can help, or large language models like ChatGPT and Claude should definitely be able to help you write code. We also have a community forums where you can post this question, we have an army of makers over there that can help out! forum.core-electronics.com.au/
This channel is about to explode🎉
Best YT practical explanation on UART and the Pico BAR NONE !!! ... cleared all my doubts and got my project moving .... THANK YOU SO MUCH 😀🥰 !
No worries, glad we could help! 😊
You explain it all in a really great way! I just realized why I couldn't get UART to work before. UART0 is the same UART that is also used by the USB connection with the computer. So your use of UART1, while connected via USB makes a lot of sense! I'm so glad I figured that out!
hmm, I came to the wrong conclusion. Apparently it can work using UART0. I couldn't connect to the REPL anymore, because Thonny got confused with the 2 picos connected to the same computer
The Pico's UART channels are independent of the USB connection, glad you solved it! :)
@@Core-Electronics I'm using an extension board from AliExpress. It has RS485 and I tried to use it directly as UART. There is some electronics between GP0/GP1 and B-/A+, which gave some strange results. I'm such a noob at this... Yesterday I connected directly to those pins and it worked like a charm. Learning all the time.
we had to do this for uni and this video seriously saved us! great video! :)
Thanks for sharing and clarifying the HW connection and SW coding - 👍
This was such a clear beginner-friendly explanation on the uart communication protocol for pico. Thanks👌👌👏👏
Hey bro can you explain one thing are we able to connect multiple pico w via uart ( Main board + 2 pico w )
UART is designed to be a one-to-one communication protocol in that you only connect 2 together. However you can technically connect multiple boards. I have had a Pico transmitting data to 3 boards at once (connect the TX of the main board to the 3 RX pins of the others), and I was having no issues receiving messages. However sending information back was a little tricky so I didn't do it.
@@Core-Electronicsthanks bro ❤ for your reply
Thank you for the excellent video. I built your circuit using two Picos and Thonny and it worked perfectly. Question, please: Is it possible to send data - even a single letter or number - from a PC-based Thonny Python program to a Pico with MicroPython using USB? It appears that there isn't a serial module for MicroPython. I can send data from the Pico to my PC using a print statement. Do I have to forget USB and connect with the Pico UART TX and RX inputs with a adapter cable to accomplish this? Thank you and best regards.
That is a bit of a question! Usually when we do this we use a full sized Raspberry Pi computer, it runs Linux and has UART pins that can be used. But using a PC-based method isn't impossible, there is a Python library called Pyserial that allows you to do exactly what you are looking for. It is a little involved though, but long story short you can have your Python script using Pyserial sending commands, and another on the Pico receiving commands.
A quick google search can help, or large language models like ChatGPT and Claude should definitely be able to help you write code. We also have a community forums where you can post this question, we have an army of makers over there that can help out!
forum.core-electronics.com.au/
Nice video! However: Link to the full course page does noy work (yet)...
noy? what's that?
Sorry to hear that, I've taken a look an the link appears functional on my end is the issue still persisting?
The link above does not work.
Sorry to hear that, I've taken a look an the link appears functional on my end is the issue still persisting?
I2C? Its gose I^2C