Commit e54d68f9 authored by Pedro Henrique Kopper's avatar Pedro Henrique Kopper

Remover código inútil de teste

parent 7c70e970
from time import sleep
import serial
from interfaces.Protocol.sadapmap_pb2 import MultiChannelReading, ReqMultiChannelReading
with serial.Serial("/dev/ttyUSB0", 115200, timeout=0.1) as ser:
print("Opened serial")
while True:
req = ReqMultiChannelReading()
req.id.append(1)
ser.flushInput()
ser.write(req.SerializeToString())
reading = MultiChannelReading()
data = ser.read(128)
print(data)
try:
reading.ParseFromString(data)
except:
print("FAILLLLLLLLLLLLLLLLLLLLLLLLL")
print(reading)
sleep(0.1)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment