omcaree / node-pololumaestro

Node module for control of Pololu Maestro servo controllers
14 stars 16 forks source link

Issue on linux #3

Closed generalPanic closed 10 years ago

generalPanic commented 11 years ago

I tried the following code:

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

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

//some initial conditions var pwm = 2000; var step = -100; var servoNum = 1; maestro.on("ready",function(){ //cycle channel 1 indefinitly maestro.getPosition(servoNum,function(position){console.log("Position: "+position);});

setInterval(function() { //reverse direction when limits reached if (pwm < 1000 || pwm > 2000) { step = -step; }

//set servo position
pwm+=step;
console.log("setting target to: "+pwm);
maestro.setTarget(servoNum,pwm);

}, 200)

});

With no output from Maestro. Verified that device is working via MaestroControlCenter.

Node version: v 0.10.12 on Ubuntu: 3.5.0-36-generic #57-Ubuntu SMP x86_64

omcaree commented 11 years ago

Thanks for posting this issue. I'll try to replicate it in the next couple of days (currently don't have access to a Maestro), and get back to you asap.

generalPanic commented 11 years ago

Thanks for the wicked fast response. I found that I'm using it in UART mode, rather than USB mode...:( Anyhow, I hope you didn't spend too much time on it, and thanks for the quick service.

Cheers, Ben

On Sun, Sep 1, 2013 at 5:04 PM, Owen McAree notifications@github.comwrote:

Thanks for posting this issue. I'll try to replicate it in the next couple of days (currently don't have access to a Maestro), and get back to you asap.

— Reply to this email directly or view it on GitHubhttps://github.com/omcaree/node-pololumaestro/issues/3#issuecomment-23634190 .

DavidEGrayson commented 11 years ago

Yep, the Serial Mode should be set to "USB Dual Port". This is not the default setting so people need to open up the Maestro Control Center and change it.