Proyect with ESC drone

I need a code for a drone, the ESC don`t work, i don´t now why?

#include <Servo.h>
Servo ESC; // create servo object to control the ESC
int potValue; // value from the analog pin
void setup()
{
ESC.attach(9,1000,2000); // (pin, min pulse width, max pulse width in microseconds)
ESC.writeMicroseconds(1000);
delay(5000);
}
void loop()
{
potValue = analogRead(A0);
potValue = map(potValue, 0, 1023, 0, 180);
ESC.writeMicroseconds(80);
/* El valor del ESC es entre 0 y 180 */
}

The ESC don´t work, the brushless meke a pulse noise, o more, no more....
I have try a lot of things but i am lost....

Any idea????

ESC.writeMicroseconds(80);

why/por qué ?

Quizas quiere hacer:/Maybe you want to do:

ESC.writeMicroseconds (map(potValue, 0, 1023, 0, 180));

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.