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

DIY Robocars via Twitter
yesterday
DIY Robocars via Twitter
RT @SahikaGenc: AWS DeepRacer & Hot Wheels Track https://youtu.be/4H0Ei07RdR4 via @YouTube
Sep 14
DIY Robocars via Twitter
Sep 8
DIY Robocars via Twitter
RT @davsca1: We are releasing the code of our Fisher Information Field, the first dedicated map for perception-aware planning that is >10x…
Sep 8
DIY Robocars via Twitter
RT @SmallpixelCar: How this works: 1)object detection to find cones in single camera image, 30 frames/sec on @NVIDIAEmbedded Xavier. 2)comp…
Sep 8
DIY Robocars via Twitter
RT @SmallpixelCar: Use two color cones to guide the robocar. No map needed, on onsite training needed. Just place the cones and it will fol…
Sep 7
DIY Robocars via Twitter
Sep 7
DIY Robocars via Twitter
RT @roboton_io: Great to see http://roboton.io running at 60fps on the cheapest #chromebook we could find! #edtech #robotics #educat…
Sep 3
DIY Robocars via Twitter
RT @openmvcam: Crazy in-depth article about using the OpenMV Cam for Astrophotography: https://github.com/frank26080115/OpemMV-Astrophotography-Gear https://t.co/BPoK9QDEwS
Sep 3
DIY Robocars via Twitter
RT @openmvcam: Hi folks, it's finally here! Our first draft of our Arduino Interface Library is out! It works over SoftwareSerial, Hardware…
Sep 3
DIY Robocars via Twitter
RT @chr1sa: Please let them have an open API. This would be perfect for @DIYRobocars races https://twitter.com/NintendoAmerica/status/1301513099707658246
Sep 3
DIY Robocars via Twitter
RT @SmallpixelCar: Lanenet pretty much used all my GPU power on @NVIDIAEmbedded Xavier since I optimized with tensorRT. I need to run anoth…
Sep 3
DIY Robocars via Twitter
RT @LyftLevel5: Our @kaggle competition on Motion Prediction for Autonomous Vehicles is now live! Experiment with the largest-ever self-dri…
Aug 24
DIY Robocars via Twitter
RT @chr1sa: Our next @DIYRobocars virtual AI car race will be on Sept 26th. Sign up here https://www.meetup.com/DIYRobocars/events/272786977/ https://t.co/UENKGSOWO8
Aug 24
DIY Robocars via Twitter
New ready-to-run @NVIDIAEmbedded JetRacer car from Waveshare. Perfect for the next @diyrobocars race as soon as we… https://twitter.com/i/web/status/1297960223013867520
Aug 24
DIY Drones via Twitter
RT @chr1sa: The US government just approved 5 US-made drones for purchase, all based on the @Dronecode @PX4Autopilot standard. Great news f…
Aug 20
More…