Raw data comes sometimes from Arduino in Python -
port = input('enter valid port = ') baudrate=input('enter valid baudrate = ') arduino_data = serial.serial(port, baudrate) while true: adata=arduino_data.readline().strip() print adata fdata=adata.split(",") arduino sends data this:
4.36625,0.08520
4.36625,0.08420
4.36625,0.08460
4.37250,0.08500
4.36750,0.08520
4.35500,0.08480
4.36000,0.08500
4.36250,0.08460
4.36250,0.08480
python reads data in python this:
4.35250,750,0.08500
how can avoid this? need 20 readings per second , accurately can plot them. if data occurs give error in plot.
Comments
Post a Comment