Arduino framework for node.js
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 11 commits ahead, 21 commits behind ecto:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib
src/du
.gitignore
README.md
index.js
package.json

README.md

[rf]duino

This fork of ecto's duino library replaces the servo library with a RF receiver and transmitter.

install

npm install duino

Make sure to upload src/du/du.ino to your arduino

receiver usage

var arduino = require('duino'),
    board = new arduino.Board();

board.on('ready', function(){

  var rfReceiver = new arduino.RFReceiver({
    board: board,
    pin: '02'
  });

  rfReceiver.on('read', function(err, data){
    console.log("data", data);
  });
});

transmitter usage

var arduino = require('duino'),
    board = new arduino.Board();

board.on('ready', function(){

  var rfTransmitter = new arduino.RFTransmitter({
    board: board,
    pin: '03'
  });

  rfTransmitter.send("hey there delilah");
});

Note that the transmitter can only send up to 26 characters at a time. Messages may be dropped if messages are sent at high rates.