Closed
Description
I noticed a lot of activity going on in the repo so I thought it might be a good time to get this request in while people are focused on the project. It's really two feature requests but they are closely related so I'm putting them in a single issue.
These requests are necessary to allow Johnny-Five to get more precise control over servos and be able to support other non-standard servos (i.e. 90°, 360° and multi-turn).
- In firmata if servoWrite is called with a value greater than 544 it should be assumed to be microseconds instead of degrees.
Here is the code in firmata
- firmata.js has a servoConfig method that allows us to to set the min and max dutyCycle in microseconds on a pin-by-pin basis. Servos are all a little different so there is no single range that is right for all. I've noticed that there is quite a variety of ranges across the different io plugins and I assume this is because the value chosen worked for whatever servo the developer's happened to have on hand.
Here is the servoConfig code in firmata.js for reference.
Here is a PR for tessel-io that shows implementations for both.