Using a LoPy4 to broadcast information from a Raspberry Pi
nigelwattrus last edited by
I am interested in using a Lopy4 to broadcast information generated by a Raspberry Pi 3B+ connected to the USB on the expansion board (v 3.1) that the Lopy4 module is plugged into. It appears that the USB is tied to the REPL interface - great when developing/interacting with module during development - but a problem when the system is (remotely) deployed. From the design of the case sold for these devices I was under the impression that connecting the RPi to the expansion board was by default, the USB. Apparently that's not the case (bad pun). Has anybody done this ie. used a Lopy4 (or any of the various boards) to broadcast information generated of a Raspberry Pi. I'm sure somebody has - could you share your code? Thanks!
I have data generated by a Raspberry and that I must distribute via a lopy (with a lora network)
So I have to connect lopy to the rpi via USB,
can someone among you help me
robert-hh last edited by robert-hh
@nigelwattrus A script on the Lopy4, when started, may use UART0 like any other UART. It may also use sys.stdin.read() and sys.stdout.write() for I/O on the USB port. To make it fully transparent, a script should call micropython.kbd_intr(-1), which disables detection on Ctrl-C and Ctrl-F on UART0.
REPL is only active when no script is running.