Created
October 24, 2021 09:13
-
-
Save CarpeNoctem/f90c22df18697633e6ae2af2a1ff5414 to your computer and use it in GitHub Desktop.
Text to epaper shield via serial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tba |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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