usb-panic-button

0.1.2 • Public • Published

panic-button

A node.js module for interfacing with the cool-looking USB Panic Button hardware like this one.

Dependencies

This module needs usb module (which depends on libusb) in order to access the button hardware. On macOS, you can install libusb using homebrew by running:

brew install libusb

Getting Started

Initialize a new PanicButton object and attach listeners to its "pressed" event. A simple example is shown below:

const PanicButton = require('usb-panic-button');
const panicButton = new PanicButton();
 
panicButton.on('pressed', () => {
  console.log('button pressed!');
});

Readme

Keywords

Package Sidebar

Install

npm i usb-panic-button

Weekly Downloads

0

Version

0.1.2

License

ISC

Last publish

Collaborators

  • happydenn