morsejs-render-vibration
v0.1.1
Published
Plugin to render morsejs output as a device vibration
Downloads
1
Readme
morsejs-render-vibration
A plugin for morsejs to vibrate a device in timing with a morse code message using the HTML Vibration API.
Installation
Dependency
npm install --save morsejs-render-vibration
Usage
var morsejs = require("morsejs"),
morsejsRenderVibration = require("morsejs-render-vibration"),
translatedMessage = morsejs.translate("hello");
/*
* Be sure to check that vibration is supported before
* you start tring to vibrate the device
*/
if(morsejsRenderVibration.isVibrationSupported()){
morsejsRenderVibration.vibrateMorse(translatedMessage);
}