Skip to content

Commit

Permalink
update package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
JerrySievert committed May 29, 2012
1 parent d6289f0 commit 3817fa7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
24 changes: 24 additions & 0 deletions examples/temperature.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
var eventduino = require('../lib/index');

var ardy = new eventduino({ serialport: '/dev/tty.usbmodemfa131' });

function convertToCelsius (RawADC) {
var temp;

temp = Math.log(((10240000/RawADC) - 10000));
temp = 1 / (0.001129148 + (0.000234125 * temp) + (0.0000000876741 * temp * temp * temp));
temp = temp - 273.15;

return temp;
}

ardy.on('watch', function (args) {
console.log('Temperature: ' + convertToCelsius(args[1]));
});

ardy.on('init', function (args, comment) {
console.log('Eventduino init version ' + comment);

// set a watch on pin 5, with a variance of 5
ardy.watch(eventduino.A5, 5);
});
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"author": "Jerry Sievert <code@legitimatesounding.com> (http://legitimatesounding.com/blog/index.html)",
"name": "eventduino",
"description": "Evented Arduino for Node.js",
"version": "0.1.1",
"homepage": "http://legitimatesounding.com/blog/index.html",
"keywords": [ "arduino", "evented", "sketch" ],
"version": "0.1.2",
"repository": {
"url": "git://github.com/JerrySievert/EventDuino.git"
"url": "http://github.com/JerrySievert/EventDuino.git"
},
"license": "MIT/X11",
"main": "lib/index.js",
"scripts": {
"test": "vows --spec"
Expand Down

0 comments on commit 3817fa7

Please sign in to comment.