Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
read dylos pm2.5/pm10 data
import serial
import time
import sys
port = serial.Serial("/dev/ttyUSB0", 9600)
while True:
with open("data.txt", "a") as f:
data = time.ctime() + "," + port.readline()
print data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.