Any
print() command ends up on the USB, and is shown on the computer via programs such as ampy get back.However, you can also send data over actual UART.
We managed to get it working based on: timhanewich.medium.com/using-uart-between-a-raspberry-pi-pico-and-raspberry-pi-3b-raspbian-71095d1b259f with the help of a DSD TECH USB to TTL Serial Converter CP2102 just as shown at: stackoverflow.com/questions/16040128/hook-up-raspberry-pi-via-ethernet-to-laptop-without-router/39086537#39086537 for the RPI.
We connect Pin 0 (TX), Pin 1 (RX) and Pin 2 (GND) to the DSD TECH, and the USB to the Ubuntu 25.04 host laptop.
Then on the host laptop I run:and a counter shows up there just fine!
screen /dev/ttyUSB0 9600rpi-pico-w/upython/uart.py
from machine import UART, Pin
import time
led = Pin('LED', Pin.OUT)
uart0 = UART(0, baudrate=9600, tx=Pin(0), rx=Pin(1))
#uart1 = UART(1, baudrate=9600, tx=Pin(4), rx=Pin(5))
i = 0
while (True):
led.toggle()
uart0.write(str(i) + '\r\n')
print(-i)
time.sleep(.5)
i += 1
Ancestors
- Raspberry Pi Pico W MicroPython example
- Program Raspberry Pi Pico W with MicroPython
- Program Raspberry Pi Pico W with X
- Raspberry Pi Pico W
- Raspberry Pi Pico variant
- Raspberry Pi Pico
- Raspberry Pi
- Raspberry Pi Foundation project
- Raspberry Pi Foundation
- Computer manufacturer
- Computer hardware
- Computer
- Information technology
- Area of technology
- Technology
- Home
Ciro Santilli