uci-interrupt/readme.md

17 lines
1.4 KiB
Markdown
Raw Normal View History

2017-05-26 08:15:54 -07:00
# uCOMmandIt Interrupt Package
2017-01-11 15:11:34 -08:00
<!-- find and replace the package name to match -->
2017-05-26 08:15:54 -07:00
[![Build Status](https://img.shields.io/travis/uCOMmandIt/uci-interrupt.svg?branch=master)](https://travis-ci.org/uCOMmandIt/uci-interrupt)
[![Inline docs](http://inch-ci.org/github/uCOMmandIt/uci-interrupt.svg?branch=master)](http://inch-ci.org/github/uCOMmandIt/uci-interrupt)
[![devDependencies](https://img.shields.io/david/dev/uCOMmandIt/uci-interrupt.svg)](https://david-dm.org/uCOMmandIt/uci-interrupt?type=dev)
[![codecov](https://img.shields.io/codecov/c/github/uCOMmandIt/uci-interrupt/master.svg)](https://codecov.io/gh/uCOMmandIt/uci-interrupt)
2017-01-11 15:11:34 -08:00
2017-05-26 08:15:54 -07:00
This module creates an ES6 Interrupt class by extending the event emitter class for use . It calls uses the pigio C library via pigpio javascript bindings package in order to set up one or more pins on an SBC as interrupts that are then listened for.
2017-01-11 15:11:34 -08:00
2017-05-26 08:15:54 -07:00
The pigipio C library is specifically coded for the Raspberry Pi but might be adapatable to any single board computer (sbc) with Gpios
assuming they would be pigio C, compatiable. You must have pigpio C library installed first.
2017-01-11 15:11:34 -08:00
2017-05-26 08:15:54 -07:00
When a gpio pin so set up is tripped this class emits a "fired" message. If you pass a handler function it will be called when the "fired" message is emitted or you can set up your own "fired" listener to do as you please.
2017-06-23 11:12:34 -07:00
You'll need to refer to https://github.com/fivdi/pigpio to make sure you have the pigpio C library set up.