summaryrefslogtreecommitdiff
path: root/receive-test.py
blob: 663f7a50bdd774b698bb3dcfb6c08dc0b8ef9c00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!./bin/python3

from RFXtrx import PySerialTransport
import sys, datetime, os

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))