37.12 PyBoard via Serial

Install a minimal low-tech terminal emulation program to connect to the PyBoard’s serial port and communicate with the PyBoard’s operating system.

wajig install picocom

On Ubuntu the device is /dev/ttyACM0 or /dev/ttyACM1 and on MacOS it is something like /dev/tty.usbmodem207F632D5F618.

sudo picocom /dev/ttyACM0
picocom v3.1

port is        : /dev/ttyACM0
flowcontrol    : none
baudrate is    : 9600
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
MicroPython v1.19.1 on 2022-06-18; Adafruit Feather STM32F405 with STM32F405RG
Type "help()" for more information.
import os
['main.py', 'pybcdc.inf', 'README.txt', 'boot.py']

Use Ctrl-D to soft reboot.

To view files:

import os

To list the root directory:

>>> os.listdir("/")
['flash', 'sd']

Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0