I'm in a project for a "big" button box for DCS/FS
Using 3x Arduino pro micro atmega32u4 5v/16mhz, 5x Rotary Encoders/Push, 10x 1way push return buttons, 10x 2ways "blocking" switches, 10x 2ways "Return" switches, 10x 10k potentiometers
One is for:
(in joystick library and button matrix) for 5 rotary encoders with push button and 2 potentiometers set as 2 axis (Rx, Ry).
Push buttons of the rotary encoders are in a matrix 1x5,
Row, Columns, Encoders and potentiometers are connected this way:
row1 is connected to pin 15 (gnd of the 5 push buttons)
column 1 is connected to pin8 (Push1)
column 2 is connected to pin9 (Push2)
column 3 is connected to pin10 (Push3)
column 4 is connected to pin16 (Push4)
column 5 is connected to pin14 (Push5)
Encoder 1 Left is connected to pin 21 (A3)
Encoder 1 right is connected to pin 20 (A2)
Encoder 2 Left is connected to pin 3
Encoder 2 right is connected to pin 2
Encoder 3 Left is connected to pin 4
Encoder 3 right is connected to pin 5
Encoder 4 Left is connected to pin 1 (tx)
Encoder 4 right is connected to pin 0 (rx)
Encoder 5 Left is connected to pin 7
Encoder 5 right is connected to pin 6
Potentiometer1 (Axis1) is on pin A1
Potentiometer2 (Axis2) is on pin A0
Gnd of encoders are connected together to one pin GND
Potentiometers are also connected together ++ to pin Vcc and -- to another pin GND
The two others are for:
2x (in joystick library and button matrix) 25 buttons on a matrix 5x5 and 4 potentiometers set as 4 axis (Z, Rx, Ry, Rz).
Rows, Columns and potentiometers are connected this way:
row1 is connected to pin 7.
row2 is connected to pin 8.
row3 is connected to pin 9.
row4 is connected to pin 10.
row5 is connected to pin 16.
column 1 is connected to pin2
column 2 is connected to pin3,
column 3 is connected to pin4,
column 4 is connected to pin5,
column 5 is connected to pin6,
Potentiometer1 (Axis1) is on pin A0
Potentiometer2 (Axis2) is on pin A1
Potentiometer3 (Axis1) is on pin A2
Potentiometer4 (Axis1) is on pin A3
Potentiometers are connected together ++++ to pin Vcc and ---- to pin Gnd
I know each device need to have a different name "ButBox1-2-3" and joystick CodeID i used "musinou" technique it works few time but now it seems to don't change te name of the controller anymore. Do i need a proper reset of my cards? Bootloader?
I did some base script by myself using what i v read on this forum i had some results, encoders or buttons working but not the potentiometers (or eratic) or i can make axis works but not buttons. I tried the easy way by asking Chat Gpt for some help, it gave me some result but not good enought. Well, i think it's me i'm not good enought lol, because chat gpt add me lot of stuffs that i don't really understand in the code.
First of all, before sharing my scripts, Is there something wrong with the project idea and the wiring to pins? Have arduino pro micro enought power by usb (without external alimentation) to manage that wiring?