Coming back to this topic.
With latest Totem Arduino release, this example works as expected:
void setup() {
Serial.begin(115200);
Servo.B.setSpeedRPM(30); // 30 RPM
}
void loop() {
// Angle control [90:180]
for (int i = 90; i <= 180; i++) {
Servo.B.spinAngle(i); // Spin to angle i
Serial.printf("Pos: %4d%%, Angle: %3d, Pulse: %4dus\n",
Servo.B.getPos(),
Servo.B.getAngle(),
Servo.B.getPulse()
);
delay(100);
}
}
Pos: 94%, Angle: 174, Pulse: 2444us
Pos: 95%, Angle: 175, Pulse: 2455us
Pos: 96%, Angle: 176, Pulse: 2466us
Pos: 97%, Angle: 177, Pulse: 2477us
Pos: 98%, Angle: 178, Pulse: 2488us
Pos: 100%, Angle: 180, Pulse: 2500us
Pos: 80%, Angle: 162, Pulse: 2300us
Pos: 60%, Angle: 144, Pulse: 2100us
Pos: 40%, Angle: 126, Pulse: 1900us
Pos: 20%, Angle: 108, Pulse: 1700us
Pos: 4%, Angle: 93, Pulse: 1544us
Pos: 5%, Angle: 94, Pulse: 1555us
Pos: 6%, Angle: 95, Pulse: 1566us
Pos: 7%, Angle: 96, Pulse: 1577us
Pos: 8%, Angle: 97, Pulse: 1588us
Pos: 10%, Angle: 99, Pulse: 1600us