update README

refactoring
This commit is contained in:
Stefan Seegel 2020-02-11 21:45:46 +01:00
parent d7bdeb11be
commit 1e85ddb9a6
2 changed files with 15 additions and 5 deletions

View file

@ -14,8 +14,8 @@ pip install -e .
#Using python module and set parameters #Using python module and set parameters
```python ```python
import RasyRFM import RasyRFM
rfm = RaspyRFM.RaspyRFM() rfm = RaspyRFM(1, RFM69)
rfm.SetParams( rfm.set_params(
Freq = 868.300, #MHz center frequency Freq = 868.300, #MHz center frequency
ModulationType = rfm69.FSK, #modulation ModulationType = rfm69.FSK, #modulation
Datarate = 9.992, #kbit/s baudrate Datarate = 9.992, #kbit/s baudrate
@ -56,6 +56,16 @@ usage example:
./rcpulse 11110000111100001111000010010000 ./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 ## lacrosse.py
receiving lacrosse temperature sensors IT29-T, IT35-T, ... receiving lacrosse temperature sensors IT29-T, IT35-T, ...
```sh ```sh

View file

@ -49,14 +49,14 @@ while True:
if bitleft == 0: if bitleft == 0:
bitleft = 8 bitleft = 8
bindata.append(0x00) bindata.append(0x00)
bindata[len(bindata) - 1] <<= 1 bindata[len(bindata) - 1] <<= 1
if bit: if bit:
bindata[len(bindata) - 1] |= 0x01 bindata[len(bindata) - 1] |= 0x01
bitleft -= 1 bitleft -= 1
bit = not bit bit = not bit
for i in range(bitleft): for i in range(bitleft):
bindata[len(bindata) - 1] <<= 1 bindata[len(bindata) - 1] <<= 1
rfm.set_params(Datarate = 1000.0 / steplen) rfm.set_params(Datarate = 1000.0 / steplen)
rfm.send_packet(bindata * rep) rfm.send(bindata * rep)