I am in great need of help. I am working on a project where the design has a motor in the back, connected to two servos mounted to each other so that it can go up and down and left and right when the servos are attached to each other, thus getting pan/tilt mobility of the motor. I have an esc, a receiver, a lipo battery, 2 servos, and an arduino (links on this post). I am using an old ESC and instead of a flight controller I am using an arduino. Right now I have the servos connected to the receiver and they are moving when I move the controller which is good, but now I face the challenge of making sure the receiver is sending signals to the arduino to send signals to the ESC to control the motor. I checked the receiver code and it is mapping and serial monitor is correct to the controls. I thought I calibrated it but it is only beeping 3 times instead of 5 to indicate it is armed when I connect to the battery. I checked and it is sending signals so the wiring should be right. Here is the code, and below is the list of electronics I am using. I am simply trying to turn on my motor right now.
code as follows:
#include<Servo.h>
#define RCPin 2
#define OutPin 5
int RCValue,ch;
Servo ESC;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(RCPin, INPUT);
ESC.attach(OutPin,1000,2000);
}
void loop() {
// put your main code here, to run repeatedly:
RCValue = pulseIn(RCPin, HIGH);
ch = map(RCValue, 1000, 2000, 100, 0);
Serial.println(ch);
ESC.write(1000);
}
List of electronics :
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
Any and all help is appreciated!