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

misfit-bolt

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

misfit-bolt

Misfit Bolt Javascript Interface

  • 0.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
Created
Source

Misfit Bolt Javascript Interface

Thin wrapper on the top of sandeepmistry/noble, that discovers Misfit Bolt bulbs, and allows turning them on/off and changing their color, as well as reading their currently set color.

Prerequisites

To connect to the Misfit Bolt, you need BLE capabilities. See sandeepmistry/noble prerequisites for more details.

Setup

npm install misfit-bolt

API

Discover

Bolt.discover(callback(bolt));

Connect

bolt.connect(callback);

On

bolt.on();

Off

bolt.off();

Set

bolt.set("228,41,15,10");

SetRGBA

bolt.setRGBA(228,41,15,10);

Get

bolt.get(callback(currentValue));

GetRGBA

bolt.get(callback(currentRGBAValue));

Example

Bolt.discover(function(bolt) {
  bolt.connect(function() {
    var i = 0,
        colors = [[228,41,15,10],
                  [216,62,36,10],
                  [205,55,56,10],
                  [211,27,76,10],
                  [166,18,97,10]];

    setInterval(function(){
      var color = colors[i++ % colors.length];
      bolt.setRGBA.apply(bolt, color);
    }, 500);
  });
});

TODO

  • CLI tool

Notes

Keywords

FAQs

Package last updated on 26 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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