mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-15 16:25:43 +00:00
14 lines
306 B
Python
14 lines
306 B
Python
import serial
|
|
import time
|
|
import sys
|
|
|
|
import sample_data
|
|
|
|
with serial.Serial(port='COM15', baudrate=2400, bytesize=8, parity='E', stopbits=1) as ser:
|
|
for packet in sample_data.kaifa_20190508_packets:
|
|
print('sleeping')
|
|
sys.stdout.flush()
|
|
time.sleep(2)
|
|
ser.write(packet)
|
|
|