APM2-Arducopter 2.7.X Analog Output Problem

Hello all!

Well, we have APM2 Purple Board on a Turnigy quadcopter frame. The problem is when I try to pull an analog output LOW, instead of LOW it gives SQUARE wave; but I don't have a problem with pulling the pin high. This problem is occurred with all of the analog pins.  I didn't see any other problem with the software or hardware. Everything works like charm; autonomous flight is stable and smooth, and remote controlled flight is perfect.

My code in ArduCopter Userhook is here:


void userhook_init()
{

}

void userhook_50Hz()
{
if(motors.armed())
{
digitalWrite(COPTER_LED_4, HIGH);
}
else
{
digitalWrite(COPTER_LED_4, LOW);
}
}


When I ARM the copter, it gives solid high with no problem; but in DISARMED mode it gives square wave instead of LOW.

Here is the DISARMED photo:
3690955949?profile=original
And here is the ARMED photo:
3690955880?profile=original


We are using latest software (ArduCopter 2.7.1 on the board and AC2_GCS on computer). Our setup includes an XBEE for communication with computer, a Turnigy receiver with a Turnigy transmitter for remote control.

You need to be a member of diydrones to add comments!

Join diydrones

Replies are closed for this discussion.

Replies

  • Developer

    My guess is that somewhere else in the code it is pulling those same pins high so you've got a little fight going on.  I think there is a parameter called LED_MODE...maybe set that to zero to disable the LEDs...not sure but will likely work.

     

    I like your scope!

This reply was deleted.