New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

raspid

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raspid

Interface with the Raspid HAT

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

raspid

Interface with the Raspid HAT for the Raspberry Pi

If running on Raspberry Pi, you must run as root.

Install

You need a sane buildchain to work with node-gyp for compiling the dependencies. If you are developing locally, you probably do not have GPIO or an SPI device. Still trying to figure out the best solution for that, perhaps a mock device using IPC to communicate.

Example

const raspid = require('raspid')();

raspid.on('idcard', function (id) {
    let idstr = id.map((n) => { return n.toString(16); }).join(':');

    // Validate that the ID can open the door
    if (idstr == '10:40:E3:CA') {
        // three seconds
        raspid.openDoor(3000);
    }
});

Keywords

rfid

FAQs

Package last updated on 14 Nov 2016

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