Arducopter Lights and Leds



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 .


Thanks

--------------------------------------------------------------- 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 langis PHP so I don’t think it`s going to be that hard .

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

Join diydrones

Email me when people reply –

Replies

  • 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
  • How do I get the flashing white LED like here: https://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.
  • 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
  • Jani, I just resent the message. I sent it to your jphelirc address so maybe it got missed. I sent now also to store@fahpah.com. I hope you can ship out this week. I would like it shipped directly to Brazil.
  • Thanks Sebastian! Some details of your post got lost in the holiday punch and anxiousness to do my first night flight ;)

    I was confused because the center pin is + also right? 5+ coming from my BEC is going there. I tried the LED there and of course was nice a bright but is also working on the top pin, though not as bring. I will need to get some stronger LED's because the ones I have I'm sure will not be that visible at night.

    Do I have to change something in the software to map the action of the green light (armed, stable, acro) to one of these output pins so the white LED blinks like in Jani's video?
  • I missed that (o_O)

    >>jani just put one single LED into every motor mount, directly connected to (RC-) OUT4-OUT7 (+ is the topmost pin and - is the lowermost pin)

    So I just connect + of the LED to middle pin and - to lower pin but what about the white light that flashes indicating stable or acro mode?
  • Well not finding a way to attach jpg but I'm referring to the triple row of pins on the APM 4-7. I'm sure that is where they should go but to exactly which pins? + of LED on middle pin and - of LED on top pin?
  • I will connect to OUT4-7 for now but wanted to be clear of where to connect. Is the connection to the OUTPUT 4-0 on the 3 row connector of the APM?

    I marked them in the drawing attached. Connect to which pins of the 3 row connector?
  • Jani I sent you an email about needing some blades urgent. I went through all but one of the ones you sent because of the lose motor connections. Are you shipping through the holidays?
  • What is the highest intensity LED I can use without harm to the circuit?
This reply was deleted.

Activity