@dermah/pulsar-transmitter

0.2.0 • Public • Published

pulsar-transmitter

Node.js implementation of a Pulsar Transmitter

Very tightly coupled with pulsar v0.2.x, see that readme for how pulsar-transmitter is used.

Usage

This will start a pulsar server thing at http://localhost:3000:

let Detector = require('@dermah/pulsar-transmitter');
let detector = new Detector(config);

config is an object that looks like:

{
  "totalCols" : 2,
  "totalRows" : 2,
  "songPath": "./song.mp3"
}

where totalCols and totalRows are the number of columns and rows respectively that there will be in the pulsar grid. songPath is used by other modules.

Give pulses to the detector like so:

detector.detect('pulse', pulse);

It's a good idea to pass pulses emitted an pulse emitter (like pulsar-input-keyboard) straight to the detector. If you have a pulse emitter in input, you could do this like so:

input.on('pulse', pulse => {
  detector.detect('pulse', pulse);
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    3
  • 0.1.2
    2
  • 0.1.1
    2
  • 0.1.0
    2

Package Sidebar

Install

npm i @dermah/pulsar-transmitter

Weekly Downloads

9

Version

0.2.0

License

MIT

Last publish

Collaborators

  • dermah