I want to make an RC plane, everything was going great with the ESC and the motor until i changed the code and it stopped working normally, I tried calibrating several ways but it just doesn't work, here's an example of my code:
#include <Servo.h>
Servo mot;
void setup() {
Serial.begin(9600);
mot.attach(8);
Serial.println("Waiting 5 seconds untril calibration");
delay(5000);
Serial.println("Sending max throttle");
mot.writeMicroseconds(2000);
delay(5000);
Serial.println("Sending min throttle");
mot.writeMicroseconds(1000);
delay(5000);
Serial.println("ESC calibration done!");
}
void loop() {
// Idle throttle
mot.writeMicroseconds(1000);
}
HI, @kokorakabobo_max
Welcome to the forum.
Can you please post your working code?
Tom....

Sure, this code was used to test the esc and it worked perfectly:
#include <Servo.h>
Servo mot;
void setup() {
mot.attach(8);
delay(1000);
mot.writeMicroseconds(2000); // Send full throttle (MAX)
delay(2000); // Wait for ESC to detect max (should beep)
mot.writeMicroseconds(1000); // Then send min throttle
delay(3000); // ESC should confirm with a few beeps
}
void loop() {
// Try different throttle values
mot.writeMicroseconds(1200);
delay(3000);
mot.writeMicroseconds(1500);
delay(3000);
mot.writeMicroseconds(1800);
delay(3000);
}
Well the setup codes are different.
Why did you change the setup when you know it works?
Try this...
#include <Servo.h>
Servo mot;
void setup() {
mot.attach(8);
delay(1000);
mot.writeMicroseconds(2000); // Send full throttle (MAX)
delay(2000); // Wait for ESC to detect max (should beep)
mot.writeMicroseconds(1000); // Then send min throttle
delay(3000); // ESC should confirm with a few beeps
}
void loop() {
// Idle throttle
mot.writeMicroseconds(1000);
}
Tom....

I make RC electric planes. What do you think a servo is going to do under throttle control? My smallest planes have 14,000 RPM brushless motors. I never heard of a continuous servo capable of that speed, but go ahead and educate me.
No, I have no interest in it.
Why, it is just your codes combined.
How do you want us to help you?
https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum
Tom....

I tried your code in post #1 and it compiles clean. What does it do or not do?
Sorry we crossed paths. I am a helper not the op.
@kokorakabobo_max This is a pointless exercise. RC planes have propeller rpm's of 14,000 RPM, a servo is only capable of 200 RPM max.
What is needed is a Brushless DC Motor, commonly known as a BLDC. Here is the specs for one of my motors https://amz.cx/3Qi7
If I bought the 1100KV motor and used a battery pack of 3S then the RPM is 1100 X 3 X 3.7 which is 12,210 RPM