servo-blaster.js

0.1.1 • Public • Published

servo-blaster.js

NodeJS library for the ServoBlaster daemon

Installation

Make sure you have node and npm installed on your Raspberry Pi.

Install the ServiBlaster daemon (https://github.com/richardghirst/PiBits/tree/master/ServoBlaster).

And you want to make sure servod is already running with --max=100% --min=0% FYI, this is the command I typically start my servod

servod --p1pins=11,29,31,33,35 --max=100% --min=0%

This will give you access to GPIO17/5/6/13/19, and allow you change PWM from 0-100%, instead by 0-12% by default.

Finally install servo-blaster.js:

npm install servo-blaster.js

Usage

var sb = require('servo-blaster.js');

sb.setP1Pwm(11, 1 ); # P1-11 (GPIO17) 100% brightness
sb.setP1Pwm(29, 0.2 ); # P1-29 (GPIO05) 20% brightness
sb.setP1Pwm(29, 0 ); # off

Credits

License

Copyright 2016 - Xinkai Wang. Published under the MIT open source license (see full license in LICENSE.txt file).

Package Sidebar

Install

npm i servo-blaster.js

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • xinkaiwang