Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eventduino

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eventduino - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

.travis.yml

14

lib/index.js

@@ -151,4 +151,8 @@ var serial = require('serialport'),

self.watch = function (pin) {
self.send(self.WATCH, [ pin ]);
self.watch = function (pin, variance) {
if (variance) {
self.send(self.WATCH, [ pin, variance ]);
} else {
self.send(self.WATCH, [ pin ]);
}
};

@@ -165,2 +169,8 @@

EventDuino.A1 = 'A0';
EventDuino.A1 = 'A1';
EventDuino.A2 = 'A2';
EventDuino.A3 = 'A3';
EventDuino.A4 = 'A4';
EventDuino.A5 = 'A5';

@@ -167,0 +177,0 @@ util.inherits(EventDuino, events.EventEmitter);

7

package.json

@@ -5,7 +5,8 @@ {

"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",

@@ -12,0 +13,0 @@ "scripts": {

@@ -5,2 +5,4 @@ # EventDuino

[![Build Status](https://secure.travis-ci.org/JerrySievert/EventDuino.png)](http://travis-ci.org/JerrySievert/EventDuino)
Support is pretty basic so far:

@@ -14,2 +16,6 @@

## Installing
$ npm install eventduino
## On the Arduino

@@ -68,3 +74,3 @@

Getting and setting of `pins` is very simple. The pin mode is changed automatically.
Getting and setting of `pins` is very simple. The pin mode is changed automatically. It is possible to `get` and `set` both digital and analog pins.

@@ -82,4 +88,4 @@ var eventduino = require('eventduino');

// get the value of pin 1
ardy.get(1);
// get the value of analog pin 1
ardy.get(eventduino.A1);

@@ -92,3 +98,3 @@ // set the LED pin to HIGH (1)

Eventduino can be set into watch mode, which will check for any changes to the `pin` and send a command if one occurs. A `watch` can be setup on as many `pins` as required.
Eventduino can be set into watch mode, which will check for any changes to the `pin` and send a command if one occurs. A `watch` can be setup on as many `pins` as required. As analog pins can have a very active variance, a second parameter `variance` can be passed for analog pins: an `event` will only be emitted if the value read on `watch` changes past the `variance`.

@@ -104,3 +110,3 @@ var eventduino = require('eventduino');

if (args[0] === 5) {
ardy.unwatch(5);
ardy.unwatch(eventduino.A5);
ardy.set(13, 1);

@@ -114,7 +120,4 @@ }

ardy.watch(1);
ardy.watch(5);
// only emit the event if +- 5 on the read
ardy.watch(eventduino.A5, 5);
});
## TODO
Implement analog pins.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc