1.3.1 • Published 5 years ago

raspi-io-server-utils v1.3.1

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

This package contains useful classes for the Raspberry Pi. TypeScript support included.

Changes: See CHANGELOG.md.

Usage

ES6 example:

// JavaScript
const { DigitalInput, DigitalOutput } = require( 'raspi-io-server-utils' );

// TypeScript
import { DigitalOutput } from 'raspi-io-server-utils/dist/src/io/digital-output';
import { DigitalInput } from 'raspi-io-server-utils/dist/src/io/digital-input';

const input = new DigitalInput( 11 );
const output = new DigitalOutput( 13 );

input.on( 'enable', () => {
    output.enabled = !output.enabled;
} );

AVPlayer

Starts audio/video files with VLC, mplayer, or omxplayer, whatever is available.

import { AvPlayer } from 'raspi-io-server-utils/dist/src/avplayer/av-player';

const player = new AvPlayer( [ 'vlc', 'omxplayer' ] );
player.play( 'movie.mp3' ).catch(
    ( err ) => console.error( 'Playback error', err )
);

IO

An extension to rpio with events on digital input/output pins and status report as JSON.

Note: Newer rpio and kernel combinations may cause freezes when hooking up interrupts. See 4.14 freezes when GPIO is pulled high and add dtoverlay=gpio-no-irq to /boot/config.txt for a workaround.

Vector clock

Small class implementing a Vector Clock for ordering asynchronous events.

1.3.1

5 years ago

2.0.0-6

6 years ago

2.0.0-5

6 years ago

2.0.0-4

6 years ago

2.0.0-3

6 years ago

2.0.0-2

6 years ago

2.0.0-1

6 years ago

2.0.0-0

6 years ago

1.3.0

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago

0.1.12

7 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago