Skip to content
This repository has been archived by the owner on May 28, 2019. It is now read-only.

Commit

Permalink
Teh functions of our doorbell arduino app
Browse files Browse the repository at this point in the history
  • Loading branch information
reconbot committed Feb 17, 2013
0 parents commit 09c44da
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions arduino.js
@@ -0,0 +1,31 @@
/*global require:true module:true */
var five = require('johnny-five');
var board = new five.Board();

var openDoor = function () {};

var goDoor = function () {

var servo = new five.Servo({
pin: 10,
range: [120, 180],
startAt: 180
});

openDoor = function () {
servo.min();
setTimeout(this.max.bind(servo), 700);
};

board.repl.inject({
servo: servo
});

};

board.on("ready", goDoor);

// var bigLed = new five.Led(6);
module.exports = {
openDoor: openDoor
};

0 comments on commit 09c44da

Please sign in to comment.