I'm Currently Building an F-16 flight sim Pit for Falcon 4 BMS. I've purchased Both an UNO & MICRO. The First circuit I'm working on is the "Master Arm Switch".
I want to use a Push-Button Switch and 3 LEDs'. I plan to use the UNO to Control the LEDs' in the Pit and the Micro to send the Keyboard Command "SHIFT A" to the Computer to Cycle it in the Game.I have a whole bunch of Push-Button Switches(I found a couple of Key-Boards from the 70's with REAL Switches).
In the Game the Default(Starting Position) is OFF. The 1rst KeyPress Turns it to "SIMULATE"(SIM), The 2nd Keypress Turns it to "ARM" and the 3rd KeyPress Turns it "OFF". Continuing to Press the Key will Repeat the Cycle.
I Plan on Using the 5V Feed from the UNO to the Switch. I put a 10K pull-down resistor on the backside of the Switch and Want Make the PIN2 on both the UNO and the MICRO the INPUT From it.
The MICRO will read the INPUT as "HIGH" and OUTPUT "SHIFT A" to the Computer.
The UNO will READ the 'FIRST' Button Press as "HIGH" and OUTPUT "HIGH" to PIN3 and Turn "ON" the YELLOW LED(Set the Game to "SIMULATE").
The UNO will THEN READ the 'SECOND' Button Press as "HIGH" and OUTPUT "LOW" to PIN3 and "HIGH" to PIN4, thus Turning "OFF" the YELLOW LED and Turning "ON" the GREEN LED(Set the Game to "ARM").
The UNO will THEN READ the 'THIRD' Button Press as "HIGH" and OUTPUT "LOW" to PIN4 and "HIGH" to PIN5, thus Turning "OFF" the GREEN LED and Turning "ON" the RED LED(Set the Game to "OFF").
Then the Cycle REPEATS itself.
I know there Must be a De-Bounce in there as Well.
I can devise circuits and build them, But I am a TOTAL NOOB at Writing the Program, so Any Help would Be Appreciated. Perhaps Someone out there has already written something like That I have Enclosed both a Panel Picture and a Diagram.
I also have a few ideas for OTHER Types of Switches, and as I fix HONDA CARS for a living I have found a PLETHORA of useable Parts in them, and I'm willing to share Them with the Entire Community.
Thank You for Your Time....Dave (A.K.A Gandalf)