blob: c1d978309088ad8c69dffb0166604c0c27714b87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#!/usr/bin/env python3
from RFXtrx import PySerialTransport
import sys, datetime, os
if __name__ == "__main__":
transport = PySerialTransport('/dev/ttyUSB0')
transport.reset()
while True:
if os.path.isfile('./stop'):
break
timestamp = datetime.datetime.timestamp(datetime.datetime.now())
recv = transport.receive_blocking()
print(str(recv))
|