0.1.1 • Published 7 years ago

raspid v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

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);
    }
});
0.1.1

7 years ago

0.1.0

7 years ago

1.0.0

7 years ago