New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bean-io

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bean-io - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

3

lib/bean.js

@@ -16,2 +16,5 @@ 'use strict';

Bean.is(function(peripheral) {
peripheral.advertisement.localName === self.name;
});

@@ -18,0 +21,0 @@ Bean.discover(function(bean){

2

package.json
{
"name": "bean-io",
"version": "0.3.0",
"version": "0.3.1",
"description": "Punchthrough LightBlue Bean IO",

@@ -5,0 +5,0 @@ "main": "lib/bean",

@@ -60,3 +60,41 @@ # Bean-io

### Use ble-bean and Johnny-Five Api Together
```js
var five = require("johnny-five");
var beanio = require("bean-io");
var boardIO = new beanio.Board({
// name: "ZAPP" // optional: you can specify a localName otherwise defaults to nearby bean
});
var board = new five.Board({
io: boardIO
});
board.on("ready", function() {
var button = new five.Button(12); // button on pin 4
button.on("down", function() {
console.log("down");
boardIO.connectedBean.setColor(new Buffer([0, 64, 64]), function(err){
console.log('set color on', err);
});
});
button.on("hold", function() {
console.log("hold");
boardIO.connectedBean.setColor(new Buffer([0, 0, 0]), function(err){
console.log('set color off', err);
});
});
button.on("up", function() {
console.log("up");
});
});
```
### API

@@ -63,0 +101,0 @@

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