Posts

Showing posts with the label REPL

CircuitPython automatically routes REPL output to your OLED Display

Image
I ran into this weird problem when using an OLED display on a Pico RP2040 when I initialized the Adafruit SH1106 SPI OLED driver.  Trash started scrolling up the screen.  The screen was erased and worked fine when sending my own graphics to it.   Finally, I looked at the output and found out Adafruit automatically routes REPL output to any display added. Video A second try at a video The first video #CircuitPython2023 Revision History 2023 03 Created

Replicating the MicroPython REPL across an HC-05 HC-06 Bluetooth link

Image
I wanted to run the MicroPython REPL and program code on an RP2040  over Bluetooth so I could avoid wires and still get into the device if there was some kind of Wi-Fi issue.  Read here or  watch the video . Bluetooth supports virtual serial ports in the same way USB devices can. RFCOMM-supporting Bluetooth adapters act as a transparent serial bridge between some RX/TX serial ports and the virtual serial port on a PC, phone, or another device type. Virtual serial ports appear on PCs after a successful pairing.  We can open the Bluetooth RFCOMM virtual serial port to read and write data as if it was serial over USB or a physical port.  We can leave that as a bare serial connection for data/commands or we can enable the MicroPython REPL to do programming, troubleshooting, and data transfer.  The truly awesome RP2040 has two software UARTS in addition to the USB serial connection.  We can connect either of these to serial RX/TX pairs to an RFCOMM-capable...