Thank you so much Roberth, now it works with sys.stdin.read(n) and sys.stdin.readline() adding in the string message the Line Feed character (CTRL-J), and this second is what I need for my project!!
Thanks again for your help!
Enrico
Search found 4 matches
- Fri Jul 23, 2021 8:52 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: How send string from PC to RP2040?
- Replies: 6
- Views: 6150
- Fri Jul 23, 2021 2:52 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: How send string from PC to RP2040?
- Replies: 6
- Views: 6150
Re: How send string from PC to RP2040?
I'm trying use sys.stdin.readline() but Pico doesn't receive nothing from CMD or from the other program that I use. :( Am I wrong to write the logic of the code? from machine import Pin import sys led = Pin(25, Pin.OUT) while True: data = sys.stdin.readline() pippo = data.decode("utf-8") if pippo.le...
- Thu Jul 22, 2021 9:28 am
- Forum: Raspberry Pi microcontroller boards
- Topic: How send string from PC to RP2040?
- Replies: 6
- Views: 6150
Re: How send string from PC to RP2040?
I connect the Rpi Pico to pc with the simple USB wire: only one USB connect to PC and Micro-USB to Pico! Could it be a problem to only have one "output" port (usb)? From Rpi Pico to Pc communication works, from Pc to Rpi Pico it doesn't. In Thonny I see strings message received in the shell, but I d...
- Wed Jul 21, 2021 10:03 pm
- Forum: Raspberry Pi microcontroller boards
- Topic: How send string from PC to RP2040?
- Replies: 6
- Views: 6150
How send string from PC to RP2040?
Hi everyone, I want to send string from pc to Pico to turn-on and turn-off the led built in, I'm using UART but I'm not having success in that. To send the string I use two different options: a program called VVVV (that I use for my project) and Window's CMD (echo 'hello' > COM n); in both cases pro...