Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RC livolo switch #58

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/adjustable-baud.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var arduino = require('../');
var board = new arduino.Board({
debug: true,
baudrate: 9600
});
}).setup();

var led = new arduino.Led({
board: board,
Expand Down
4 changes: 2 additions & 2 deletions examples/adjustable-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var arduino = require('../');
var board = new arduino.Board({
debug: true,
device: "ACM"
});
}).setup();

var led = new arduino.Led({
board: board,
Expand All @@ -12,4 +12,4 @@ var led = new arduino.Led({

board.on('ready', function(){
led.blink();
});
});
2 changes: 1 addition & 1 deletion examples/analogled.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var arduino = require('../');

var board = new arduino.Board({
debug: true
});
}).setup();

var aled = new arduino.Led({
board: board,
Expand Down
2 changes: 1 addition & 1 deletion examples/basic.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

var arduino = require('../');

var board = new arduino.Board();
var board = new arduino.Board().setup();

board.on('connected', function(){
board.write('HELLO WORLD');
Expand Down
2 changes: 1 addition & 1 deletion examples/button.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var arduino = require('../');

var board = new arduino.Board();
var board = new arduino.Board().setup();

var button = new arduino.Button({
board: board,
Expand Down
2 changes: 1 addition & 1 deletion examples/combination.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var arduino = require('../');

var board = new arduino.Board();
var board = new arduino.Board().setup();

var button = new arduino.Button({
board: board,
Expand Down
18 changes: 18 additions & 0 deletions examples/ir.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
var arduino = require('../')
var arduino = require('../')
board, ir;

var board = new arduino.Board({
debug: true
}).setup();

var ir = new arduino.IR({
board: board
});

board.on('ready', function(){
setTimeout(function() {
//ir.send(3, "20DF10EF", 48);
ir.send(7, "802080A0", "C2CA");
}, 1000);
});
4 changes: 2 additions & 2 deletions examples/led.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ var arduino = require('../');

var board = new arduino.Board({
debug: true
});
}).setup();

var led = new arduino.Led({
board: board,
pin: "A0"
pin: "13"
});

board.on('ready', function(){
Expand Down
2 changes: 1 addition & 1 deletion examples/piezo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ var arduino = require('../');

var board = new arduino.Board({
debug: true
});
}).setup();

var piezo = new arduino.Piezo({
board: board
Expand Down
2 changes: 1 addition & 1 deletion examples/ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var arduino = require('../'),

board = new arduino.Board({
debug: false
});
}).setup();

ping = new arduino.Ping({
board: board,
Expand Down
2 changes: 1 addition & 1 deletion examples/pir.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var arduino = require('../'),

board = new arduino.Board({
debug: false
});
}).setup();

pir = new arduino.PIR({
board: board,
Expand Down
21 changes: 21 additions & 0 deletions examples/rc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
var arduino = require('../')
board, rc;

var board = new arduino.Board({
debug: true
}).setup();

var rc = new arduino.RC({
board: board,
pin: "10"
});

board.on('ready', function(){
setTimeout(function() {
// alternative: rc.decimal("123456")
rc.triState("0FFF0FFFFF0F");
}, 1000);
setTimeout(function() {
rc.triState("0FFF0FFFFF00");
}, 2000);
});
2 changes: 1 addition & 1 deletion examples/sensor-throttled.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var arduino = require('../'),

board = new arduino.Board({
debug: false
});
}).setup();

sensor = new arduino.Sensor({
board: board,
Expand Down
2 changes: 1 addition & 1 deletion examples/sensor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var arduino = require('../'),

board = new arduino.Board({
debug: true
});
}).setup();

sensor = new arduino.Sensor({
board: board,
Expand Down
2 changes: 1 addition & 1 deletion examples/servo.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var arduino = require('../'),
// Construct instances
board = new arduino.Board({
debug: true
});
}).setup();

led = new arduino.Led({
board: board,
Expand Down
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@ module.exports = {
Sensor: require('./lib/sensor'),
Ping: require('./lib/ping'),
PIR: require('./lib/pir'),
LCD: require('./lib/lcd')
LCD: require('./lib/lcd'),
RC: require('./lib/rc'),
IR: require('./lib/ir')
};
Loading