You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey so iv made a 2 button gamepad, and im trying to get it to show up as Sequential Shifter in windows Game Controllers and not 8 axis 2 button device, iv tired loads of diffrent code, and iv tired looking in the header files for help.... how do i do this? this is my code:
// Pin Definitions
const int BUTTON_1_PIN = 12; // Pin for Button 1
const int BUTTON_2_PIN = 13; // Pin for Button 2
// Create a gamepad configuration
BleGamepadConfiguration config;
// Initialize the gamepad instance with the name 'Gamepad Shifter'
BleGamepad gamepad("Sequential Shifter", "Craig Jenkins", 100);
void setup() {
Serial.begin(115200);
// Setup the gamepad configuration explicitly
config.setModelNumber("Sequential Shifter");
config.setSoftwareRevision("1.0");
config.setSerialNumber("123456789");
config.setFirmwareRevision("1.0");
config.setHardwareRevision("1.0");
config.setVid(0x1234); // Set your Vendor ID
config.setPid(0x5678); // Set your Product ID
config.setGuidVersion(0x0110); // Set your GUID Version
// Only declare buttons
config.setButtonCount(2); // Set button count to 2
config.setHatSwitchCount(0); // No hat switches
gamepad.begin(&config); // Initialize with the configuration
// Setup button pins as input with pull-ups
pinMode(BUTTON_1_PIN, INPUT_PULLUP);
pinMode(BUTTON_2_PIN, INPUT_PULLUP);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hey so iv made a 2 button gamepad, and im trying to get it to show up as Sequential Shifter in windows Game Controllers and not 8 axis 2 button device, iv tired loads of diffrent code, and iv tired looking in the header files for help.... how do i do this? this is my code:
`#include <BleGamepad.h>
#include <BleGamepadConfiguration.h>
// Pin Definitions
const int BUTTON_1_PIN = 12; // Pin for Button 1
const int BUTTON_2_PIN = 13; // Pin for Button 2
// Create a gamepad configuration
BleGamepadConfiguration config;
// Initialize the gamepad instance with the name 'Gamepad Shifter'
BleGamepad gamepad("Sequential Shifter", "Craig Jenkins", 100);
void setup() {
Serial.begin(115200);
}
void loop() {
static bool button1State = false;
static bool button2State = false;
}`
Beta Was this translation helpful? Give feedback.
All reactions