• Advertisement

LED MODE INDICATORS ON MOTOR ARMS

Discussion about the ArduCopter 2.x project

LED MODE INDICATORS ON MOTOR ARMS

Postby GarethRens » Wed Jul 06, 2011 12:39 pm

Does any1 have an idea on how to setup the arducopter to indicate via different color leds on the motor mounts as to what mode the copter is in, eg. stabilize, alt hold, loiter.

From what i can see in the code (APM_Config.h)

There are these lines:

#define MOTOR_LEDS 1 // 0 = off, 1 = on

#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


From my limited knowledge of C.

The above pins can be set to different conditions (HIGH or LOW), so instead of using them for individual motors, we could use each one for a color of led and mode.

EG.
1. Mount tri color leds on all the motor mounts.
2. Connect pin PE4 to the blue leds (stabilize)
3. Connect pin PE5 to the red leds (loiter)
4. Connect pin PH4 to the green leds (auto)

Then in the code find the variable that is set for the mode. (im still looking...)

Then a simple if then else in the setup loop() (or a function can be made)

if ( stabilizeMode = 1 ) {
digitalWrite(PE4, HIGH);
}


and the same for the other 2 modes.

My syntax is probably not 100%.

But will the idea work????

Thanks in advance :)
http://www.stuffinc.co.za
We sell all kinds of stuff, including multi-rotor UAV/Drones :ugeek:
User avatar
GarethRens
Site Admin
 
Posts: 476
Joined: Mon Jul 04, 2011 7:47 pm
Location: Vereeniging

Re: LED MODE INDICATORS ON MOTOR ARMS

Postby GarethRens » Sat Aug 27, 2011 2:01 pm

So far the replies iv received on DIY drones are that of hardware solutions.

E.G. Julie Macfarlane says:
Use a 1K resistor into the base of a BC 152.
680 ohms from the supply to the led, the led to the collector.
Emitter to ground.
That should handle several leds.


Still waiting for a response on whether my "code" is good or not...
http://www.stuffinc.co.za
We sell all kinds of stuff, including multi-rotor UAV/Drones :ugeek:
User avatar
GarethRens
Site Admin
 
Posts: 476
Joined: Mon Jul 04, 2011 7:47 pm
Location: Vereeniging

Re: LED MODE INDICATORS ON MOTOR ARMS

Postby Reynier » Thu Jan 31, 2013 2:25 pm

:hmmm:
Shax this is a good idea if it was something to use cause it will work grait!
Have you had some other replays or did you resurch it some ware else Garthrens?
Please let me know as well if you have seen some light
User avatar
Reynier
 
Posts: 17
Joined: Fri Jan 04, 2013 10:41 am
Location: Durban Area


Return to ArduCopter

Who is online

Users browsing this forum: No registered users and 1 guest

  • Advertisement

x