Add python code to simulate AMS data

This commit is contained in:
Vegar Westerlund
2019-05-11 17:10:56 +02:00
parent 1e602e9194
commit 09caae4093
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
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)