UPM library for the PCA9685-based Adafruit 16-channel servo shield. If 3 or more GWS servos are attached, results could be unpredictable. Adafruit Industries recommend installing a capacitor on the board, which should alleviate the issue. Sizing depends on servos and their number.
for (;;) {
cout << "Setting all to 0" << endl;
for (n = 0; n < 16; n++)
servos.servo(n, 1, 0);
upm_delay_us(1000000);
cout << "Setting all to 45" << endl;
for (n = 0; n < 16; n++)
servos.servo(n, 1, 45);
upm_delay_us(1000000);
cout << "Setting all to 90" << endl;
for (n = 0; n < 16; n++)
servos.servo(n, 1, 90);
upm_delay_us(1000000);
cout << "Setting all to 135" << endl;
for (n = 0; n < 16; n++)
servos.servo(n, 1, 135);
upm_delay_us(1000000);
cout << "Setting all to 180" << endl;
for (n = 0; n < 16; n++)
servos.servo(n, 1, 160);
upm_delay_us(2000000);
}