1

I have a script on my pi that currently simply outputs some numbers from a sensor to the console, several times a second. I am using this for a demonstration, and need a way to reliably (not over the network) stream this data to my Linux-based laptop, so that a program there can read and interpret it to incorporate it into my demo. Can the pi's USB cable be used as some sort of serial output device, piping in my script's output and streaming this data to a socket or /dev entry on my main device? (And, of course, how could I pull this off?)

I am on a Raspberry Pi 3 B+. I don't have any additional hardware (console cable etc) nor the time or money to order one, I just want to establish some sort of socket / serial connection over the Pi's USB cable.

1 Answers1

3

This answer describes how to transfer plain text between PC and RpiB, using a serial cable.

At the PC side, an usb to serial adapter can be used to converts PC's USB signals to 5V UART serial signals .

At the Rpi3 side, there are 2 GPIO pins: UART0 Txd, Rxd for data transfer at 3.3V level.

These Rpi UART signals at 3.3V should be shifted up to 5V, then PC and Rpi can communicate at the same logical level.

/ to be continued, ...

USB to TTL UART adapter

tlfong01
  • 4,847
  • 3
  • 12
  • 24