Skip to content

Instantly share code, notes, and snippets.

View ccloli's full-sized avatar
💩
Shitty shit shitting shits shittily

864907600cc ccloli

💩
Shitty shit shitting shits shittily
View GitHub Profile
@ccloli
ccloli / pmspi.py
Last active August 4, 2018 18:30 — forked from lackofdream/pmspi.py
Raspberry Pi and PMS5003
import serial
import datetime
import time
port = serial.Serial('/dev/ttyUSB0', baudrate=9600, timeout=2.0)
port.write(b'\x42\x4D\xE4\x00\x01\x01\x74')
def read_pm_line(_port):
rv = b''