/mappy-commands

Commands for Mappy the sheep

Primary LanguageJavaScript

Mappy commands

Usage

Mappy is an awesome sheep. It can do so many things. Run a command like so:

$ node run.js --command=ToggleUsbPowerCommand --id=05e3:0608 --port=4 --mode=off

Or include the commands in your JavaScript as a module:

var commands = require('mappy-commands');
var toggleUsbPowerCommand = new commands.ToggleUsbPowerCommand();
toggleUsbPowerCommand.run({
    id: '05e3:0608',
    port: 4,
    mode: 'off'
});

The return value of run() is always a promise.

Commands

KillProcessesCommand

When Mappy talks too much, run this. Mappy can talk all day long and it can be very annoying.

LedTextCommand

Mappy can show some cool scolling text on a led device. You need this:

ListAudioFilesCommand

List files in folder ./audio

PlayAudioFileCommand

Mappy plays audio files/streams. You need this:

RocketLauncherCommand

RunSerialCommand

Sometimes it's better mappy does things serial

TextToSpeechCommand

Let mappy baa. Uses google's translation webservice.

  • text - what should mappy say
  • language - (en, de, fr, ...)
  • speed - 1.0 is normal speed
  • tempo - 1.0 is normal tempo
  • pitch - 0 ist normal pitch

ToggleUsbPowerCommand

Mappy can control USB devices. How about switching some usb lamp? You need this: