Skip to content

Instantly share code, notes, and snippets.

@CarpeNoctem
Created October 24, 2021 09:13
Show Gist options
  • Save CarpeNoctem/f90c22df18697633e6ae2af2a1ff5414 to your computer and use it in GitHub Desktop.
Save CarpeNoctem/f90c22df18697633e6ae2af2a1ff5414 to your computer and use it in GitHub Desktop.
Text to epaper shield via serial
#!/usr/bin/env python3
# Takes text from stdin and sends it to the serial device designated in the first argument
from sys import stdin,argv
import serial
serial_device = serial.Serial(argv[1])
serial_device.write( bytes(stdin.read().rstrip(), "utf-8") )
serial_device.close()
quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment