Hi there!
I am a manufacture in quad Copter Controller for Windows using the now Wifi.
To communicate with UDP, it has to send a signal to the ESC.
However, brushless motor does not work.
Perhaps I think that because the calibration has not be set.
Symptom is the same symptoms as the video below.
Calibration was in reference to the following.
Navio2 source code
int main()
{
PWM pwm;
int sock;
int val;
int errno;
int n;
double inputMax = SERVO_MAX - SERVO_MIN;
double InputData;
double ST;
struct sockaddr_in addr;
char buf[2048];
sock = socket(AF_INET, SOCK_DGRAM, 0);
addr.sin_family = AF_INET;
addr.sin_port = htons(12345);
addr.sin_addr.s_addr = INADDR_ANY;
bind(sock, (struct sockaddr *)&addr, sizeof(addr));
val = 1;
ioctl(sock, FIONBIO, &val);
if (check_apm()) {
return 1;
}
if (!pwm.init(PWM_OUTPUT) && !pwm.init(PWM_OUTPUT + 1)) {
printf("Output Enable not set. Are you root?\n");
return 0;
}
pwm.enable(PWM_OUTPUT);
pwm.set_period(PWM_OUTPUT, 50);
while(true)
{
memset(buf, 0, sizeof(buf));
n = recv(sock, buf, sizeof(buf), 0);
if(n >= 1)
{
ST = inputMax * atof(buf) + SERVO_MIN;
printf("%lf\n", ST);
}
pwm.set_duty_cycle(PWM_OUTPUT, ST);
}
return 0;
}