update ir test route
This commit is contained in:
parent
969f232bbe
commit
d6d3326a82
1 changed files with 3 additions and 1 deletions
|
@ -14,6 +14,7 @@ var users = new models.Users();
|
|||
// Arduino communications
|
||||
var arduino = new arcom.Arduino(config.debug);
|
||||
var rc = new arcom.RC(arduino);
|
||||
var ir = new arcom.ir(arduino);
|
||||
|
||||
// Get arduino ready
|
||||
arduino.setup();
|
||||
|
@ -59,7 +60,8 @@ router.post('/changeRC', auth, function (req, res, next){
|
|||
|
||||
// IR Routes
|
||||
router.get('/irTest', auth, function (req, res) {
|
||||
arduino.write(new Buffer('X0' + String.fromCharCode(4) + String.fromCharCode(12) + String.fromCharCode(0)+String.fromCharCode(0)+String.fromCharCode(2689 / 256) + String.fromCharCode(2689 % 256),'ascii'));
|
||||
//arduino.write(new Buffer('X0' + String.fromCharCode(4) + String.fromCharCode(12) + String.fromCharCode(0)+String.fromCharCode(0)+String.fromCharCode(2689 / 256) + String.fromCharCode(2689 % 256),'ascii'));
|
||||
ir.send(4,12,2689);
|
||||
res.send('switch light');
|
||||
});
|
||||
|
||||
|
|
Reference in a new issue