Community Forum

diy button box with pro micro

Forum Overview >> Farming Simulator 22

CategoryFarming Simulator 22
Created20.06.2022 17:37

Stefan H Viljoen (stefanh) 20.06.2022 17:37
good day to all. i have a small problem and hope some1 can help.
i build myself a few button boxes for my gaming. all works well with ats ets2 and farming sim 19 and 22
but. just on my desktop pc. when i use the button boxes with my laptop it does not map any buttons. all other games works fine. just farming does not. fs22 does show the name of the controller like pro micro or Leonardo. but it does not pick up any pressed keys. but on my pc its all fine. just not on my laptop. any help please. regards stefan

Loki Laufeyson (loki_79) 20.06.2022 20:52
What library are you using? This one?

If the same device is working on your desktop, then I guess it is a windows setting. If you open notepad on your laptop, can you see the key presses?

Stefan H Viljoen (stefanh) 21.06.2022 13:40
hi there. im using <Joystick.h> both pc and laptop pick up the pro micro as joystick. and when i test the buttons they work. fs22 shows' that a pro micro is connected. but it just does not see any buttons when i press them. the wiring is done in a 4x6 matrix. but im only using 25. my pc and laptop both have same programs and all up to date. ill keep trying today. this is where i got the library
this is the sketch ://MicroUSBButtonBox by Les O'Reilly
//Arduino IDE 1.6.6 (or above) !

//This Makes a ZERO Axis with 56 Button USB Controller (Game pad)
//Keypad will configure the Buttons 0-55
//A3,A2,A1,A0 Are the Row Pins for the Keypad D0-D10,D14-D16 are the Column Pins
//Button 0 wires as A3+D16 Where A3 is Row and D13 is Column, Button 13 - A3+D0
//Button 14 wires as A2+D16 ...Button 27 A2+D0
//Button 28 wires as A1+D16...Button 41 A1+D0
//Button 42 wires as A0+D16....Button 55 A0+D0

#include <Keypad.h>
#include <Joystick.h>

#define NUMBUTTONS 56
#define NUMROWS 4
#define NUMCOLS 14

//define the symbols on the buttons of the keypads
byte buttons[NUMROWS][NUMCOLS] = {

byte rowPins[NUMROWS] = {21,20,19,18}; //connect to the row pinouts of the keypad
byte colPins[NUMCOLS] = {16,15,14,10,9,8,7,6,5,4,3,2,1,0}; //connect to the column pinouts of the keypad

//initialize an instance of class NewKeypad
Keypad buttbx = Keypad( makeKeymap(buttons), rowPins, colPins, NUMROWS, NUMCOLS);

//initialize an Joystick with 56 buttons;
false, false, false, false, false, false,
false, false, false, false, false);

void setup() {

void loop() {

void CheckAllButtons(void) {
if (buttbx.getKeys())
for (int i=0; i<LIST_MAX; i++) // Scan the whole key list.
if ( buttbx.key[i].stateChanged ) // Only find keys that have changed state.
switch (buttbx.key[i].kstate) { // Report active key state : IDLE, PRESSED, HOLD, or RELEASED
case HOLD:
Joystick.setButton(buttbx.key[i].kchar, 1);
case IDLE:
Joystick.setButton(buttbx.key[i].kchar, 0);

Note: Log in to post. Create a new account here.