Package Exports
- rpi-433
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rpi-433) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rpi-433
NodeJS module to send and receive decimal codes through 433Mhz device on RaspberryPI 2
Dependencies
Building WiringPi
pi@raspberrypi ~ $ git clone git://git.drogon.net/wiringPi
...
pi@raspberrypi ~ $ cd wiringPi/wiringPi
pi@raspberrypi ~/wiringPi/wiringPi $ sudo su
...
root@raspberrypi:/home/pi/wiringPi/wiringPi# ./buildInstallation
npm install rpi-433Usage
Firstly, make sure you are running your application as root or with sudo, else the Raspberry Pi will not let you output/input to the GPIO and you'll get an error.
sudo npm myscript.jsPlease note that there are different and confusing ways to reference a channel. This module supports wPi schema. Once wiringPi is installed, in your CLI you can run gpio readall and check the wPi column.
gpio readallExample
var rpi433 = require('rpi-433'),
rfSniffer = rpi433.sniffer(),
rfSend = rpi433.sendCode;
// Receive
rfSniffer.on('codes', function (code) {
console.log('Code received: '+code);
});
// Send
rfSend(1234, function(error, stdout) { //Send 1234
if(!error) console.log(stdout); //Should display 1234
});
