Raspberry Pico, Thonny and serial output #9619
Replies: 1 comment 17 replies
-
You shouldn't include the
The fact that it works in the other programs is interesting. Does
There's no baud rate involved when talking over USB. It's a fake serial port (a CDC ACM device). When you set a baud rate, it's send to the Pico, but ignored by MicroPython. This does matter when you're talking to a microcontroller that doesn't natively support USB and instead it's via a USB to UART converter on the board (e.g. an ESP32 and many older Arduino boards) -- the baud rate send to the USB/UART converter is then used to configure the UART that talks to the actual chip). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello to everybody.
It seems to be quite a simple task but I cannot figure out why it doesn't work.
The Pico is connected to a Windows PC by an ordinary USB cable.
Programming works fine, so the cable must be intact.
What I want from the Pico is:
He should send me a string in every second.
What I write is:
import time
print('string\r\n')
time.sleep(1)
I can see the string in the console of Thonny.
Closing Thonny ( to release the COM-Port) and opening a terminal software also shows me this string every second.
But this only works with the serial Monitor of the Arduino-IDE and with Putty.
If i use hTerm or my own software ( which works perfectly with an Arduino nano in the same way) it shows nothing.
What I wonder is:
How does this micropython script know which baudrate it has to use?
Any help is veeery welcome.
Cheers,
Matt
Beta Was this translation helpful? Give feedback.
All reactions