I added very bright LED headlights to the quad a while back a) to freak the locals out at night and b) to help with orientation when the quad is far away. These are 12V LEDs and run straight of the 3S lipo. All was well....
One thing I don't like much is the rather small and dim SMD LED to tell me when the motors are armed. Mostly because it is small and dim but I also want to paint my CD spindle housing black.
So, why not make the LEDs turn on and off when the motors are armed and disarmed? Simple. We have a relay which can be controlled and I speak code (well, sort off).
A delve into the current 2.3 source code and I think motors.pde would be the best place to do this.
A simple relay.on() and a relay.off do the trick.
Now, I run the power from the LEDs from the battery, via the relay and the to the LEDs. Lights on. Lights off. :)
Hopefully this will help someone else do something like this.
if(motor_armed == false){
// arm the motors and configure for flight
init_arm_motors();
//turn the headlights on
relay.on();}
...snip...
if(motor_armed == true){
// arm the motors and configure for flight
init_disarm_motors();
//turn the headlights off
relay.off();}
p.s.
If there is a better place to put the command, I'm all ears. I've not studied the whole code
layout.
Comments
Thanks.
Well for me I would go with a big RED LED to indicate motors are armed. I always forget!!!
I was thinking last night, I want to move the code to the user hook and only turn the less on when the motors are armed and there is a GPS lock.
BTW, would you like to share your configuration: motors, battery and flying time (reduced after LEDs?)?
thanks
Ruwan.
excellent, I myself wanted to implement similar after 2 accidents :) well you made my life easier!
great
very simple to implement ...