General Programming Help

So here's what I'm doing: I wanted to create a small button panel for a game so I can learn about the process. I decided on eight buttons (arranged into a matrix), two toggle switches, and two rotary encoders. I only plan on pushing one button at a time, which is why I didn't install those diodes to stop ghosting.

Perhaps you all can help me with several questions I have about the programming side of things:

How do I define what the rotaries and switches are plugged into? And how to I tell the board what to do when each button is pressed? I've been looking at some tutorials and don't entirely understand. Below are pictures and the main video I've been referring to.

A good start would be to draw up your switches and wiring. A schematic.
We can point you in the right direction then… step out on your own and we’ll hold your hand when you hit obstacles.

Take some time to research how to connected two encoder functioning to an Arduino UNO.

I have a diagram (The website would only allow me to upload one file). The problem I'm having is defining the buttons/switches/rotaries. Does anyone know of a more in depth resource I can use? I also saw this program that gives you a representation of what the board sees when you press the buttons on the panel. Is that on this website?

OMG...yet another crappy so called "schematics" software.

Can I suggest you draw your circuit with pen(cil) and paper.
Please include ALL pin names, especially on the encoder.

I notice you are using the Tx and Rx pins for switch signals, the Tx and Rx pins are how the 328 IC communicates with the USB converter, to program the Nano and to send data..

Thanks.. Tom... :smiley: :+1: :coffee: :australia:

Methods vary depending on the game. Many people have done something like this using an Arduino that can act as a keyboard, such as a Leonardo. Then your code just reads the buttons and sends whatever keystrokes make sense in the game.

Some games will accept commands over serial or ethernet too.

The video you link seems to go into excruciating detail revealing all answers to the kind of questions you are asking.

If you haven’t, watch the entire thing without worrying about learning anything or doing it right away.

The IDE has a number of simple examples that should help explain the way these simple concepts are combined for larger more complicated things.

Take small steps and try to get them working as they are written. Take small steps making small changes to the examples and see if you are catching on.

There are many Arduino button box designs w/ tutorials, videos &c. Take a look, and any you don’t find annoying or confusing right away should be watched carefully.