Hello,
I am trying to arm my ESC (listed at the bottom), it is supposed arm like the photo shown but I cannot get the last "beep" which means it is not seeing zero throttle. But it is getting the throttle for the 4th beep, anyone see anything wrong with my code that could be causing this?
#include<Servo.h>
#define RCPin 2
#define OutPin 5
int RCValue, i, ch;
Servo ESC;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(RCPin, INPUT);
pinMode(OutPin, OUTPUT);
//ESC.attach(OutPin,1000,2000);
digitalWrite(OutPin, HIGH);
delayMicroseconds(1000);
digitalWrite(OutPin, LOW);
delayMicroseconds(1500);
delay(500);
}
void loop() {
// put your main code here, to run repeatedly:
//RCValue = pulseIn(RCPin, HIGH);
//ch = map(RCValue, 1000, 2000, 100, 0);
//Serial.println(ch);
for (i=0; i<=100; i++) {
digitalWrite(OutPin, HIGH);
delayMicroseconds(1200);
digitalWrite(OutPin, LOW);
delayMicroseconds(1300);
}
for (i=0; i<=100; i++) {
digitalWrite(OutPin, HIGH);
delayMicroseconds(800);
digitalWrite(OutPin, LOW);
delayMicroseconds(1700);
}
exit(0);
//ESC.write(1000);
}
Servo - hitec hs-645mg
https://hitecrcd.com/products/servos.../hs-81/product
Arduino Mega
https://store-usa.arduino.cc/collect...eac57cb3&_ss=c
Esc -Lumenier Elite 60A 2-6S BLHeli_32 4-in-1 ESC
https://www.getfpv.com/lumenier-elit...-in-1-esc.html
Lipo 4s battery- 1300mAh 4S Lipo Battery 14.8V 100C
https://www.amazon.com/CNHL-1300mAh-...st_sto_dp&th=1
Receiver for flysky fs-iA10B