Check out the jDrones IO board.
Yeah check jD-IOBoard. It listens MAVLink and you can program different type patterns for different flight modes.
Here is simple connection diagram for it
You can find boards from our store at jDrones
Yes I will add it to there too, was on conference call while made that diagram.
(plain jdrones.com is still having minor issues due our hosting company, they are fixing it. all others like www.jdrones.com, store.jdrones.com etc are working ok)
Here's another way using a single cheap npn transistor, just not sure how to configure the free port :
You can also plug small LED lights directly into the AN ports:
All you have to do is move the positive pin over one space to the outside of the connector. So there is an empty space between the positive and negative pins. If you leave the positive pin where it is, it will be connected to the 5V rail and will always be on. Move it over one to connect it to the actual AN port.
These ports can only handle ~10mA by themselves, so be careful.
According datasheet. Absolute maximum current per IO pin is 40mA and overall is 200mAh for whole chip. Having one single LED on output port (x4) is possible to use but it can cause brownouts already. So like Rob said, be careful if you connect LED's directly to APM.
We made this possible on original ArduCopter designs and on ArduCopterNG code but it is not suggested way to connect LEDs. You should always use a driver to connect loads and then you can be worry free.
That hobbyking 3 LED block eats 37mA on 5V (I have few here to test). If you have 4 of those directly on APM, you will kill it for sure, even one can harm it as it's close to absolute maximum rates already. So don't do it :)
That is one main reason why we created jD-IOBoard as it does not require any soldering on main APM board and it can do many other things on same time as just driving LEDs/Buzzers/Relays
That much? I tried to measure it, but it wouldn't even register. Then I tried the 6 LED block and saw ~20mA, so I figured the 3 LED would be OK.
I have I think 3 of the 4-led blocks running off an APM2 in my HK450, no problems yet.