Need help with wiring


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...

Any comments or suggestions appreciated.

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.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

1 Like

How is it supposed to work?

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.

1 Like

Maybe if we knew what you were trying to create

Hello aca_021

Welcome to the worldbest Arduino forum ever.

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.

Have a nice day and enjoy coding in C++.

I googled
dcs world simulator

We need a link to the switch infomation to know what kind of switches they are.

Like this

https://uk.farnell.com/c-k-components/jsm07011saqnl/switch-slide-sp3t/dp/2435147

we also need to know EXACTLY what "arduino" you are using

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.


this weapon panel i want to bind

With respect to post#5, tell us, what don't you understand?

A different issue brought up a similar button box issue requiring libraries for the Leonardo only...

That is my old pictures when i am build that.its fixed now.

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.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.