simone
(simone)
June 12, 2016, 4:04am
1
Hello
I am making a program to perform the calibration of the now ESC.
This video in the reference, has created a program
① turn on the power.
② Enter the maximum output value of the PWM
③ Enter the minimum output areas of PWM
UsedESC:simonk esc 12a
However, my program made did not work.
Please tell me something good way.
int main ()
{
PWM pwm;
if (check_apm ()) {
return 1;
}
if (! pwm.init (PWM_OUTPUT)) {
fprintf (stderr, ".? Output Enable not set Are you root \ n");
return 0;
}
pwm.enable (PWM_OUTPUT);
pwm.set_period (PWM_OUTPUT, 50);
while (true) {
pwm.set_duty_cycle (PWM_OUTPUT, SERVO_MAX);
sleep (10);
pwm.set_duty_cycle (PWM_OUTPUT, SERVO_MIN);
}
return 0;
}
First of all you are doing a while true loop that will constantly go from max to min immediately to max, which will not help you in calibration.
Also you delay is really short in the order of 10ms…
Dale
As of now underlying kernel driver for Navio 2 that generates PWM needs to be fed with data at least every 100ms. It’s not documented. Sorry. It is a safety feature that is to be handled differently but you should be aware of it if you’re tinkering around at the moment. It won’t be a problem to adapt the program to this feature .
Dale is also correct about the program flow. It does indeed needs fixing! Sorry for the late answer. I haven’t been noticing this thread up until now.
simone
(simone)
June 21, 2016, 3:59am
4
Thank you both of them
Turn on the power, it is initialized to the minimum value from the maximum value.
However, the motor does not work
Detail
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 Input…
Please tell me if you have any cause if.