Closed muscaiu closed 4 years ago
This should be pretty straight-forward:
GPIO.output()
with rpio.write()
time.sleep()
with rpio.usleep()
and convert to microseconds.I'd avoid using the BCM numbering, just use the physical numbering that rpio defaults to and set the physical pin you are using instead for TRANSMIT_PIN
(in the case of BCM17 that would be physical pin 11).
The rest is basic JS.
When someone sais pretty straight-forward, i't's never like that at all! :D I have no experience with Python, so pretty much all the code is unclear.
Edit: I'm calling the file like this: const process = spawn('python', ["./livolo.py", 'on']);
Hello, i found this really simple tutorial on turining on/off a Livolo light switch https://www.instructables.com/id/Controlling-a-Livolo-RF-Light-Switch-Using-a-Raspb/
It's the only code i found working, however the problem is i can't really read python and i was wondering if someone can translate this into node maybe using this library.
Thanks!