hi, i have 6 buttons and 5 momentary switch (on-off-on).can someone tell me is my wiring diagram good or i need chance sometings like 10k ohm resistors?and if i need resistors can someone tell me how to wire that...i trying to make switch box for dcs world simulator...
I moved your topic to an appropriate forum category @aca_021.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
Just getting some terminology out of the way:
The buttons are momentary switches, unless they are latching but I doubt it.
The slide switches are not momentary unless they are spring-centred, which I doubt.
You would NOT connect any switch inputs to the DTR pin.
Pins used for inputs could use the INPUT_PULLUP feature but then you could would need to be set up for active low.
But your switches all seem to be set up in some sort of matrix so I suspect you are going to struggle if you are asking about how to connect pullup or pulldown resistors.
How it is now, you need to write a low or high to certain "output" pins, and read through all the "input" pins to see which have changed - it's going to be relatively complex.
I seriously suggest you look over the sample switch sketches and some switch wiring suggestions - there's plenty to choose from.
EDIT
Those small Arduinos like the Pro Mini have:
10 digital inputs that would suit your momentray push buttons
8 analog inputs that could be used for multi-position (or more) slide switches (one per switch)
no need for a complex switch matrix
You'll need some part of your sketch that gets all the button and switch info our via USB that suits DCS
I see 7 buttons and 5 slide switches. The buttons can be managed in a 3x3 matrix with two buttons missing. The matrix can be managed with any number of keypad matrix libraries.
The 5 slide switches get the center wired to an input, and their 'left' or 'right' wired to GND. That's up to you. These inputs must be declared as 'INPUT_PULLUP" in setup().
This presumes normal momentary NO pushbuttons, and two-position slide switches, not momentary or center-off.
Check the possible use of an Arduino DUE.
This Arduino has a native USB port and a lot of IO pins, so that later changes and extensions can be implemented very easily.
i just realase that is better to use arduino leonardo or pro micro 32u4 board programmed as a HID then i can bind buttons in DCS (Flight simulator)controls.here is example what i made and want to wired,but not sure can pro micro handle all buttons or i need make matrix for some.
I made new schematic ,made matrix with all buttons except 2 on-on toggle switch on pictures.my red switches on schematic is on-off-on with 3 pin rest of it is classic on-off with 2 pin.is possible to red switches on schematic center pin connect to gnd then left and right pin connect to column and row or i need another row for center pin ?I put resistor in columns for 3 blue toggle switch on-off to prevent ghosting.