Skip to content

Node module for control of Pololu Maestro servo controllers

Notifications You must be signed in to change notification settings

rwaldron/node-pololumaestro

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-pololumaestro

This module allows control of the Pololu Maestro range of servo controllers from Node.js allowing your project to interact with the world!

Dependancies

This module requires node-serialport in order to comminucate with the Maestro, this should be installed automatically.

Installation

Install this module with

npm install pololumaestro

Usage

Here's a minimal example of how to use the module

var PololuMaestro = require("pololu-maestro");

//create new instance, specifying control com port
var maestro = new PololuMaestro("COM17");

//some initial conditions
var pwm = 2000;
var step = -10;

//cycle channel 1 indefinitly
setInterval(function() {
	//reverse direction when limits reached
	if (pwm < 1000 || pwm > 2000) {
		step = -step;
	}
	
	//set servo position
	maestro.setPWM(0,pwm+=step);
	
}, 20)

About

Node module for control of Pololu Maestro servo controllers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published