update README
refactoring
This commit is contained in:
parent
d7bdeb11be
commit
1e85ddb9a6
2 changed files with 15 additions and 5 deletions
14
README.md
14
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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue