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:

And here is the ARMED photo:



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.

Tags: apm2, ardcopter

Views: 161

Replies are closed for this discussion.

Replies to This Discussion

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!

Yep It worked! Thanks.

Yeah I love this scope too :)

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service