austinbv/dino

Servo class doesn't work properly

Closed this issue · 2 comments

I haven't tested this in a few weeks, but when I tried to use dino to control a servo motor, it failed very badly. I tried with two different 180 degree servos. Inputting target degrees led to inconsistent movements, often resulting in the servo attempting to move out of it's own limitations.

A servo relies on a PWM signal to tell it what position to move to. Servo just does an anlog write to the pin, which uses the Arduino chip's native PWM. This may or may not produce the right frequency and/or duty cycle to move the servo you have. I've noticed the same issues with a small hobby servo.

It works fine with the Servo library included in the Arduino IDE though, so I updated the sketch (and dino) to take advantage of it:

https://github.com/austinbv/dino/tree/ethernet-shield

You'll need to build dino version 0.11.2 and upload the new sketch to try it out. See the readme and changelog in that branch for more info.

Fixed in #22