protocol icon indicating copy to clipboard operation
protocol copied to clipboard

Define a new Servo 2.0 interface that is decoupled from AnalogWrite

Open soundanalogous opened this issue 8 years ago • 4 comments

The current Servo interface uses the Firmata Analog message to set it's value. This creates tight coupling between ServoFirmata and AnalogWrite and AnalogOutputFirmata.

We need a new Servo interface that uses Sysex. Does anyone have an opinion on changes to the existing firmata servo interface?

soundanalogous avatar Dec 24 '16 03:12 soundanalogous

I would like to see multiServo that allows me to pass a position for each member in a group of servos in a single message (see multiStepper).

dtex avatar Jan 02 '17 20:01 dtex

~~Ability to write in degrees or µsec (the latter is nice for high resolution writing)~~

It just occurred to me that I think EXTENDED_ANALOG provides this

rwaldron avatar Jan 09 '17 20:01 rwaldron

Also worth noting that not all servos are 180 degrees so you'd have to be able to pass in the physical range of the servo as part of a configuration command in firmata. If that happens, I want to be able to specify radians as a configuration option because radians are better than degrees for IK work. Having to convert back and forth slows things down.

dtex avatar Jan 09 '17 20:01 dtex

I would suggest to add an optional feature ID for servo usage, SERVO_OPERATION for example. Like what I2C_REQUEST having done, the existing servo interface servoWrite(pin, degree) would be one mode of it. However, servoWrite() function can only make servo move as we requesting, we also need to know the state of servo in some cases. So, I think it would be nice to add servoRead() function, which would be one mode of SERVO_OPERATION as well.

zoooofu avatar Jan 12 '17 06:01 zoooofu