4 years, 11 months ago.

Multiple Servos

I have 2 servos that i need to program simultaneously. How do i calibrate them separately using the void calibrate() function?

Question relating to:

A class to control a model R/C servo, using a PwmOut PwmOut, Servo

1 Answer

4 years, 11 months ago.

I Aman,

You must call the calibrate function for each declared servo. ex:

  1. include "mbed.h"
  2. include "Servo.h"

Servo throttle(p21); Servo roll(p22);

float range = 0.0005;

throttle.calibrate(range, 100.0); roll.calibrate(range, 180.0);

I use this method to control a quad through a CC3D flight controller. works fine...

Philippe