Skip to content

Latest commit

 

History

History
47 lines (35 loc) · 1012 Bytes

README.md

File metadata and controls

47 lines (35 loc) · 1012 Bytes

Build Status

pavlokjs

JavaScript Wrapper for the Pavlok API

You want to use your pavlok in a cool way. Its only a simple call away.

Instalation

$ npm install pavlokjs

Usage

var pavlok = require('pavlokjs');

// id is your pavlok id
pavlok.init({objectId: id});

pavlok.shock(strength);
// you can also chain them
pavlok.beep(frequency).shock(power);

Supported pavlok functions

For vibrate and shock, value is anywehre from 0-255. For beep and blink(LED), value is anywhere from 1-4.

beep(frequency)
blink(frequency)
shock(power)
vibrate(power)

Running tests

$ npm test

Small usage exmamples