Hello world, can someone help me figure out why my engines aren't running? I have a 10S LiPo battery, a Phoenix ICE2 HV 80 ESC and a brushless motor connected to a breadboard and an Arduino Mega 2560. Please note, I am using the arduino to control the motor instead of a receiver/throttle stick setup.
When I run my program, the motor beeps 5 times, which according to the manual means:
Radio Signal: Signal from receiver is corrupt or non-existent. Check transmitter and receiver.
The motor occasionally has run on this setup, so I think the power is being fed ok, although the motor has run for brief periods while I was trying to figure things out. The signal wires seem to be connected, nice and solid... Am I missing something? I'm going outside to hook up the battery to the charger and see what the reading on that is. But if you have any ideas, please let me know. Thank you.
Before I forget, here is the code I'm using.
************** CtrlEngine.ino
#include <Servo.h>
#include <Wire.h>
Servo eng1; // Engine left of nose.
const int pinEng1 = A8;
void armEngs()
{
eng1.attach(pinEng1);
setThrottle1(0);
delay(1000);
}
void setThrottle1(int thrust)
{
int angle = map(thrust, 0, 100, 0, 180);
eng1.write(angle);
}
************** UAVHover1_0ctrltest.ino
#include <Servo.h>
#include <Wire.h>
void setup()
{
Serial.begin(9600);
armEngs();
}
// Main loop
void loop()
{
setThrottle1(10);
delay(2000);
setThrottle1(20);
delay(2000);
setThrottle1(00);
delay(2000);
}