n-e-y-s/G27_Pedals_and_Shifter

Add additional Buttons (Button Box)

Opened this issue · 1 comments

first of all, thanks for this wonderful project.
I will use my g29 Shifter with the Arduino Pro Micro as descibed. But i would like to add 4 additional standart buttons (only active if pressed) as a button box. is it possible to do this with 1 arduino (shifter + buttons) or do i have to use 2 boards?
thanks for your help

The project works perfect. Great thanks to the author.
If anyone happened to implement that, please share your experience. For g27 shifter I placed an additional button connected it through DB9 non-used pin5 and to pin5 of my ProMicro. Surprisingly, it also makes shifter power led light up whenewer button is released. However, I struggle to make an appropriate piece of code.
I managed to make it work with the code below added to the one of this project. Sadly, it includes another library, and it then shows up as a separate gamepad in windows. I could not figure out how to make it work using <HID.h> only. I am not too experienced in all that stuff though.


#include "HID-Project.h"
void setup() {
pinMode(BUTTON, INPUT_PULLUP);
Gamepad.begin();
}
void loop() {
gamepadTick();
}
void gamepadTick() {
if (millis() - timer > 10) {
timer = millis();
if (!digitalRead(BUTTON) Gamepad.press(1);
else Gamepad.release(1);
Gamepad.write();
}
}