I'm trying to input signals directly onto NyBoard, and I noticed there are 0 to 15 on the board. So I tried to write a simple code to test on a servo:
#include <Servo.h>
Servo panServo;
int pos = 0;
void setup() {
panServo.attach(2); # test with pin 2
Serial.begin(115200);
}
void loop() {
panServo.write(pos);
pos++;
Serial.println(pos);
delay(2000);
}
From the Arduino serial monitor, I can confirm my IDE is communicating with NyBoard, but there is no response from the Petoi servo when I connect it with pin 2 (I have tested the servos and they are not faulty). I have also confirmed I do not have the greg/black/white pins mixed up. What do I miss?
First, be sure tu use the battery, the USB doesn't deliver power to the motors.
The servos aren't connected directly to the processor (the Atmel 32 chip), but to a multi-PWM driver (PCA9885 chip).
If you think in terms of Arduino board, the motors aren't connected to the PWM pad of the Arduino (pins 9 /10 for UNO) but to a servo shield.
So you can't use the Servo.h library, you have to use some dedicated library, such as Adafruit_PWMServoDriver.h which appears in the OpenCat sources.
I don't know if this answer makes sense to you. It will depend on your background.
I can elaborate more and/or write an example if you need.