summaryrefslogtreecommitdiff
path: root/receive-test.py
diff options
context:
space:
mode:
authorPatrick Simianer <pks@pks.rocks>2019-01-27 00:27:21 +0100
committerPatrick Simianer <pks@pks.rocks>2019-01-27 00:27:21 +0100
commit843bb50c48a8b11c572c1e64e0237d09d635e1f0 (patch)
tree60fe62048b80ef392b275e77df69748e41fd81df /receive-test.py
init
Diffstat (limited to 'receive-test.py')
-rwxr-xr-xreceive-test.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/receive-test.py b/receive-test.py
new file mode 100755
index 0000000..663f7a5
--- /dev/null
+++ b/receive-test.py
@@ -0,0 +1,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))
+