From 1e85ddb9a6615a7e13adf4e63691781347e760ed Mon Sep 17 00:00:00 2001 From: Stefan Seegel Date: Tue, 11 Feb 2020 21:45:46 +0100 Subject: [PATCH] update README refactoring --- README.md | 14 ++++++++++++-- apps/connair.py | 6 +++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a0e995c..3020870 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,8 @@ pip install -e . #Using python module and set parameters ```python import RasyRFM -rfm = RaspyRFM.RaspyRFM() -rfm.SetParams( +rfm = RaspyRFM(1, RFM69) +rfm.set_params( Freq = 868.300, #MHz center frequency ModulationType = rfm69.FSK, #modulation Datarate = 9.992, #kbit/s baudrate @@ -56,6 +56,16 @@ usage example: ./rcpulse 11110000111100001111000010010000 ``` +## Receive 433 MHz RC remote controls +```sh +./rcpulse.py +``` + +## Receive 868 MHz ELV FS20 RC remote controls +```sh +./rcpulse -f 868.35 +``` + ## lacrosse.py receiving lacrosse temperature sensors IT29-T, IT35-T, ... ```sh diff --git a/apps/connair.py b/apps/connair.py index e6bdbc6..31dfea4 100755 --- a/apps/connair.py +++ b/apps/connair.py @@ -49,14 +49,14 @@ while True: if bitleft == 0: bitleft = 8 bindata.append(0x00) - + bindata[len(bindata) - 1] <<= 1 if bit: bindata[len(bindata) - 1] |= 0x01 bitleft -= 1 bit = not bit for i in range(bitleft): - bindata[len(bindata) - 1] <<= 1 + bindata[len(bindata) - 1] <<= 1 rfm.set_params(Datarate = 1000.0 / steplen) - rfm.send_packet(bindata * rep) + rfm.send(bindata * rep)