Compare commits
2 Commits
128a2c32fa
...
d0f82299c0
Author | SHA1 | Date |
---|---|---|
interfisch | d0f82299c0 | |
interfisch | 5286466d2c |
|
@ -0,0 +1,31 @@
|
||||||
|
#! /usr/bin/env python3
|
||||||
|
import serial
|
||||||
|
|
||||||
|
#chars=" qwertzuiopü+asdfghjklöä#yxcvbnm,.-QWERTZUIOPÜ*ASDFGHJKLÖÄ'YXCVBNM;:_1234567890ß!\"§$%&/()=?"
|
||||||
|
chars=" qwertzuiop+asdfghjklöä#yxcvbnm,.-QWERTZUIOP*ASDFGHJKLÖÄ'YXCVBNM;:_1234567890ß!\"§$%&/()=?"
|
||||||
|
|
||||||
|
#asciiresolution_max=[97,65] #maximum, in characters xy. Teilung=15
|
||||||
|
#asciiresolution_max=[78,65] #maximum, in characters xy. Teilung=12
|
||||||
|
asciiresolution_max=[65,30] #maximum, in characters xy. Teilung=10
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
import sys
|
||||||
|
if len(sys.argv) != 2:
|
||||||
|
print("Usage: serialtype filename")
|
||||||
|
sys.exit(1)
|
||||||
|
filename=sys.argv[1]
|
||||||
|
|
||||||
|
with serial.Serial('/dev/ttyUSB0', 9200, timeout=1) as ser:
|
||||||
|
ser.write(b'test')
|
||||||
|
ser.write(b'\n')
|
||||||
|
ser.write(b'zeile2')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
Reference in New Issue