I was wondering if it is possible to have the onboard lights  behavior copied to some led’s connected somewhere in available outputs , for tows ho have a closed body’s for they cuadcopters .

And where are the navigational lights connected in the current release ( witch port or output pins ) ?, I know this is a momentarily fix and well be moved in the future .


--------------------------------------------------------------- EDIT -------------------------------------------------------------------

I have found the code for the onbord leds in the Arducopter_alpha_RC1 file

  pinMode(LED_Yellow,OUTPUT); //Yellow LED A  (PC1)
  pinMode(LED_Red,OUTPUT);    //Red LED B     (PC2)
  pinMode(LED_Green,OUTPUT);  //Green LED C   (PC0)

I want to use the behavior from Leds A and C

Witch are for GPS fix and OK BOOT .


Dose somebody know how can i tweak this code to use with 2 led’s connected somewhere in the available  ports on the APM ?


My knowledge in to C++ is 0 so i want to start with this and hopefully learn something :) , my programming lang is PHP so I don’t think it`s going to be that hard .

Views: 5410

Reply to This

Replies to This Discussion

OK I uncommented #define isAM but have a ? on ArduUser.h

Right now it's

// AM Mode & Flight information

/* AM PIN Definitions */
/* Will be moved in future to AN extension ports */
/* due need to have PWM pins free for sonars and servos */

#define FR_LED 3 // Mega PE4 pin, OUT7
#define RE_LED 2 // Mega PE5 pin, OUT6
#define RI_LED 7 // Mega PH4 pin, OUT5
#define LE_LED 8 // Mega PH5 pin, OUT4

#define FR_LED AN12 // Mega PE4 pin, OUT7
#define RE_LED AN14 // Mega PE5 pin, OUT6
#define RI_LED AN10 // Mega PH4 pin, OUT5
#define LE_LED AN8 // Mega PH5 pin, OUT4

Do I need to change anything or uncomment anything. I'm plugging the lights into OUT4-7
just leave it like that
How do I get the flashing white LED like here: http://www.youtube.com/watch?v=Ne00IgTtbGQ

And should the white flashing be in the front or rear? Jani says in the video that RED is right but then says flashing is rear which doesn't jive with the video. VIdeo shows red on right and flashing on front or red on left and flashing in rear.

red is allways left (not just for quadrotors)

did you upload the code with #define isAM uncommented?


i also, am very curious on this topic of extra LED's...  recently i have purchased these LED strips, http://www.hobbyking.com/hobbycity/store/uh_viewItem.asp?idProduct=... from hobby king on a swarm sale...  it seems like people are powering them from 3S batteries and they are SUPER bright.  is there a way to map an output as a relay or some other switch device to i can get signal from the Arudino and power from the 11.1V source for the brightness?  i think it would be great to use these a navigation lights, and maybe when battery voltage is getting low, they blink?  or maybe having one color for one flight mode, and another color when in the other flight modes?  trying to get double duty out of the LED strips.  navigation, and some signaling?


i think i (assuming i did it correct) uploaded a circuit i saw on some other RCGroups forum, but i'm not too experience of an electronics guy... does this look right, and what would any of the values be?  or are there any easier ways to accomplish this task?


thanks!  can't wait to get to experimenting and learning more!

Sebastian: I forgot to update the code :-/ Can I do it via xbee or does it need to be via USB? My xbee connection works fine with configurator but when I try to upload code I get this error in Arduino app.

Binary sketch size: 53090 bytes (of a 126976 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

These LED strips typically require a driver that can sink the required current from the LiPo voltage.

You could employ about the same type of driver chip (ULN2803A in my case) as I used for a "vending machine demo" I produced for my company. There a tiny microcontroller IIO port signal goes to the input of one of the eight darlington array drivers of this chip to sink the current (pull low) of a LED strip powered by +12 volts at the other end.  This means you connect one lead of the LED strip to LiPo voltage and the other

to say pin 18 pin of this driver chip. When a logic 1 (high) signal is presented on pin 1 of this driver chip it will pull output pin 18 low,  thus turning on the LED array (sinking current). Very straightforward.

These rather inexpensive chips with eight drivers poses very little load on the controlling port but can drive high currents. It´s up to the designer to not load the driver chip with higher total currents than what is healthy for the chip. There´s no internal current limiting so the chip would melt and burn before giving up if employed to drive excessive currents. But treated nicely as we do here this is handy and compact hardware.

Can I resurect this tread? :)

I have a question on where to connect... I know it was explained but I dont get it...

New code will use AN 8,10-12,14 for motor led. I assume these pins are the (+) and we just a common ground for the (-) ??? is that where people solder the (-)?  something like in the Expansion port AN6 GND??


the pins looks like this from Jani picture...

FTDI port | Analog Ports

0000000| 00000000




0000000| 02468101214


                             6 7

                           +5v +5v

                           GND GND


I just want to be sure waht to use!  oh and I assume that all AN0-AN15 are +5v?? right or wrong?



everything correct
hi. is there a preffered way how to solder the lights onto these pins? id like a solution where theres no need to resolder anything when removing imu from the frame etc...

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service