Copter LEDS with APM2?

Is anyone successfully using COPTER_LEDS with APM2.0 and ArduCopter 2.7.1?

I got some of these LEDs from HK, they seem to work OK, they're very bright when plugged in to the analog ports on my APM2.  

I'm trying to just get MOTOR LEDS working, so I connected an LED to AN7 (red wire to S and black to -) and set LED_MODE to 1.  When the motors are disarmed, the LED flashes (good).  However when I arm the motors, the LED goes off.  This seems reversed, I think it should be ON.  Also, when I set LED_MODE to 0, which I believe from looking at the code should make all LEDs go OFF, they all go ON instead.

So, it appears to me that the LEDs are all reversed.  I noticed in config.h that APM1 used:

# define LED_ON           HIGH
# define LED_OFF         LOW

whereas APM2 uses:

# define LED_ON           LOW

# define LED_OFF         HIGH

Could this possibly be a bug?  I don't know enough about the hardware changes from APM1 to APM2 to figure it out.  I also haven't been able to build my own version of 2.7.1 in order to test it.

 

Any thoughts are appreciated.

Thanks

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

Join diydrones

Email me when people reply –

Replies

  • Anyone had success with this project?? I downloaded u4eake's code mods for 2.6.x AC code, and got so far as to compile successfully, but now I'm a little stumped as far as which pins ate the equivalent analog out pins that I would connect to the input half of my 2803 transistor chip for driving/animating LED strips without browning out APM 2?!
  • In fact I had them wired wrong.  Putting the red on S and black on - fixed it.  This will teach me to wire things in the middle of the night :) 

  • Try wiring the LED with red to +5V and black to AN7.  When the output goes low, the LED will go on.

This reply was deleted.

Activity