Flight sim annunciator panel

Hi!
I have a Mega and want to control 15 5volt led annunciator lights from FSX and x_plane. I think I can figure this out, but what I also want to do is to have a TEST button that will check all led's by turning them all on when pressed. Can I do this through Arduino, or should I make a pc board with diodes that allow the button to power up all of the led's when pressed, but isolates them from each other when their own input signal says to light up.

Thanks for any input.
Steve

I don't know why you have a Mega (2560) if you are just a beginner with this as a UNO (or Nano would be much easier to work with) would be more than adequate for the task.

The best way to operate 15 lights in general would be to use two TPIC6B595s, but you really need to start specifying things - just what are these "led annunciator lights", why would there be a need to "test" them since LEDs in general are highly reliable with a very long lifetime indeed, and what is the rest of your project that you need them for? Your question indicates that you have no understanding or experience of a microcontroller such as an Arduino whatsoever. :roll_eyes:

That is of course, quite OK, you have to start somewhere. What is your story?

byte ledArray[] = {2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,};
byte x;
void setup(){
for (x=0; x<15; x=x+1){
  pinMode (ledArray[x], OUTPUT);
  digitalWrite (ledArray[x], HIGH); // assumes HIGH turns on an LED with appropriate current limit resistor
  delay(250);
  digitalWrite (ledArray[x], LOW);
  }
} 
void loop(){
// now your sketch ...
}

Paul_B,
Clearly you don't know what an annunciator light or panel is. It is a panel that monitors the condition of certain items. If an item deviates from a preset condition, it lights up as a visual alert that something needs attention. Yes, LEDs are long lasting and very reliable, but in the real world of airplanes, things fail and you want to develop habits and procedures for when that happens. Yes this is just a simulator, but good habits are hard to beat when the time comes. So, as part of the pre-flight checks, you push the test button to know that all the lights are working... understand now?
OK, so the MEGA might be overkill or not. Are you saying it won't work for this application? Are you saying it isn't a good platform for this? Is it to difficult to program? What is it you are saying?

Thanks,
Steve

Thanks CrossRoads!
That seems pretty straight forward.

Steve

ifrpilot89:
OK, so the MEGA might be overkill or not. Are you saying it won't work for this application? Are you saying it isn't a good platform for this? Is it to difficult to program? What is it you are saying?

I am saying that you have not explained what parts you have and what you are doing in a sufficiently useful fashion to enable us to help.

Yes, it is indeed quite straightforward but do you know what the code CrossRoads provided actually does? Can you explain what effect it will display on your annunciator lights?

I am talking about what parts you are using beyond the Mega - what is their actual specification? How are you wiring them up? To what else are you connecting it? How will they connect?

Whether I have known what an annunciator is for the past fifty or sixty-odd years or not is not the question. Whether you can adequately describe and provide circuit diagrams of how you propose to connect things is more to the point. :astonished:

I would input the test button signal into the sim, so it is FS/XP the one that activates the light panel. That way, whether you press the button in your panel or click on it in the sim, both the in sim and your panel will light up.

Great idea escaner ...
Thanks !