Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wuub/micropython-rfsocket
Micropython implementation of popular 433MHzn based RFSockets (i.e. Anslut/Proove/Nexa)
https://github.com/wuub/micropython-rfsocket
Last synced: about 16 hours ago
JSON representation
Micropython implementation of popular 433MHzn based RFSockets (i.e. Anslut/Proove/Nexa)
- Host: GitHub
- URL: https://github.com/wuub/micropython-rfsocket
- Owner: wuub
- License: mit
- Created: 2015-08-30T16:19:22.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-06T21:19:00.000Z (almost 6 years ago)
- Last Synced: 2024-10-13T08:52:54.680Z (26 days ago)
- Language: Python
- Size: 6.84 KB
- Stars: 34
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mpython - micropython-rfsocket - Micropython implementation of popular 433MHzn based RFSockets. (精选驱动库 / 通讯类)
- awesome-micropython - micropython-rfsocket - MicroPython implementation of popular 433MHz-based RFSockets. (Libraries / Communications)
README
# micropython-rfsocket
Micropython implementation of popular 433MHz based RF Sockets (i.e. Anslut/Proove/Nexa) using cheapo FS1000A transmitter.## Installation
1. Get upip for your python3 installation `pip install micropython-upip`
2. Create "lib" directory on your micropython SDcard/Filesystem
3. Install micropython-rfsocket there like this `python -m upip install -p /media/[your-login]/45DE-XXXX/lib micropython-rfsocket`
4. Use in `main.py` like this: `from rfsocket import RFSocket`## Range
As far as I can tell FS100A transmitter connected to 3V3 seems to be at least twice as strong as the remote sold with the sockets. Stock remote is spotty at best. FS1000A was able to reliably toggle the socket trough multiple walls.## Basic usage
```python
#!/usr/bin/env python3import pyb
from rfsocket import RFSocketp = pyb.Pin('X1', pyb.Pin.OUT_PP)
r = RFSocket(p)sw = pyb.Switch()
on_led = pyb.LED(2)
off_led = pyb.LED(1)toggle = True
while True:
if sw():
if toggle:
r.group_on()
on_led.on()
off_led.off()
else:
r.group_off()
on_led.off()
off_led.on()
toggle = not toggle
pyb.delay(300)
```