Hello everyone,
Im trying to make a drone so i decided to use arduino uno r3 as its brain.
Now im stuck at one place , when i tried to calibrate the esc everything went well and the motor starts rotating but above a point the speed of the motor decerases i dont know why… Please help me out of this …
#include<servo.h>
Servo esc;
void setup() {
esc.attach(9);
Serial.begin(9600);
}
Void loop() {
int speed;
speed = map(analogRead(A0), 0, 1023, 700, 2000);
Serial.println(analogRead(A0));
esc.writeMicroseconds(speed);
}
There is no syntax error that i get.
I tried both writeMicroseconds and write functions but im facing the same problem.
In the above code the speed drops when the analogvalue is around 600.
Any type of help will be appriciated