Hello I am building a quadcopter. Basically I have done this and today i did the first flight using a transmiter and a receiver in the quad that was giving / saying to the flight controller what to do. I am trying to do something like that using an arduino So there is the following setup.
My problem is that I can not ARM and DISARM a flight controller from Arduino ? I used to do this by moving the stick of my transmiter to the down left corner.
xmarkx:
My problem is that I can not ARM and DISARM a flight controller from Arduino ? I used to do this by moving the stick of my transmiter to the down left corner.
If anyone knows anything....please respond!!
Are you using the Servo library to control the AIL, ELE, THR, and RUDD inputs of the flight controller? You just have to figure out which two servo outputs to set. I guess THR to 0 and RUDD to 0:
// Arm flight controller
ThrottleServo.write(0);
RudderServo.write(0);
delay(2000); // Wait for the flight controller to recognize the ARM command
RudderServo.write(90); // Return rudder to center position.
I can not say X.write(MAX);. I have to replace the word MAX with a value. And i dont know if this value is 1000 1500 2000 or more. That is what i am saying.
Assuming you're using writemicroseconds and assuming (again) that you're using 'standard' servos, fully down and fully left sounds like 1000,1000 to me. 1500 is a center position so that's unlikely to do you any good. Of course, as AWOL says, depending on your servo arrangement, either one of those 1000s might need to be 2000. Experiment!
ThrottleServo.write(0);
RudderServo.write(0);
delay(2000); // Wait for the flight controller to recognize the ARM command
RudderServo.write(90); // Return rudder to center position.
If you want to use writeMicroseconds() that would be:
// Arm flight controller
ThrottleServo.writeMicroseconds(1000); // MIN Throttle
RudderServo.writeMicroseconds(1000); // Full Left Rudder (use 2000 for Full Right Rudder)
delay(2000); // Wait for the flight controller to recognize the ARM command
RudderServo.writeMicroseconds(1500); // Return rudder to center position.
johnwasser:
If you want to use writeMicroseconds() that would be:
// Arm flight controller
ThrottleServo.writeMicroseconds(1000); // MIN Throttle
RudderServo.writeMicroseconds(1000); // Full Left Rudder (use 2000 for Full Right Rudder)
delay(2000); // Wait for the flight controller to recognize the ARM command
RudderServo.writeMicroseconds(1500); // Return rudder to center position.
johnwasser:
If you want to use writeMicroseconds() that would be:
// Arm flight controller
ThrottleServo.writeMicroseconds(1000); // MIN Throttle
RudderServo.writeMicroseconds(1000); // Full Left Rudder (use 2000 for Full Right Rudder)
delay(2000); // Wait for the flight controller to recognize the ARM command
RudderServo.writeMicroseconds(1500); // Return rudder to center position.
I am having the same problem and I have used this code its not working...