• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
Sim Racing Wheel Button Box 3D Printer File Image 1
Sim Racing Wheel Button Box 3D Printer File Image 2
Sim Racing Wheel Button Box 3D Printer File Image 3
Sim Racing Wheel Button Box 3D Printer File Image 4
Sim Racing Wheel Button Box 3D Printer File Thumbnail 1
Sim Racing Wheel Button Box 3D Printer File Thumbnail 2
Sim Racing Wheel Button Box 3D Printer File Thumbnail 3
Sim Racing Wheel Button Box 3D Printer File Thumbnail 4

Sim Racing Wheel Button Box

K.Andreas1985 avatarK.Andreas1985

December 15, 2024

makerworld-icon
DescriptionCommentsTags

Description

Buttonbox für Länkräder fürs Sim Racing

 

Benötigte Teile

 

1x Arduino Micro Pro

12x Buttons  ( hole D12)

7x M3 20mm screw 

2x M3 30mm screw 

2x M3 nut 

15x M3 heat inserts 

2x OMRON D2HW-BL201H 

4x 10x5mm magnets 

 

 

 

Hinweise:

  1. Wiring der Buttons:
    • Verbinde einen Kontakt jedes Tasters mit einem der definierten Pins (2 bis 20).
    • Den anderen Kontakt des Tasters verbindest du mit GND.
  2. Testen:
    • Schließe den Arduino an den PC an.
    • Öffne die Systemsteuerung und suche nach den Gamecontroller-Einstellungen, um die Buttons zu testen.
  3. Anpassungen:
    • Du kannst die Pins und Anzahl der Buttons anpassen, indem du die Arrays und Konstanten änderst.
    • Falls du LEDs oder andere Funktionen hinzufügen möchtest, kann der Code entsprechend erweitert werden.

Viel Erfolg beim Bau deiner Buttonbox! 😊

 

Arduino code :

 

#include <Joystick.h>

// Anzahl der Buttons definieren
#define NUM_BUTTONS 16

// Pins der Buttons
int buttonPins[NUM_BUTTONS] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, 17, 18, 19, 20};

// Joystick-Instanz erstellen
Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID,
                  JOYSTICK_TYPE_GAMEPAD,
                  NUM_BUTTONS,  // Anzahl Buttons
                  0,            // Keine Achsen
                  false, false, false,   // Keine X, Y, Z Achse
                  false, false, false,   // Keine RX, RY, RZ Achse
                  false, false,          // Keine Rudder, Throttle
                  false, false, false);  // Keine Accelerator, Brake, Steering

void setup() {
 // Buttons als Eingang konfigurieren
 for (int i = 0; i < NUM_BUTTONS; i++) {
   pinMode(buttonPins[i], INPUT_PULLUP);  // Pull-Up-Widerstand aktivieren
 }

 // Joystick starten
 Joystick.begin();
}

void loop() {
 // Status der Buttons auslesen und an Joystick melden
 for (int i = 0; i < NUM_BUTTONS; i++) {
   int buttonState = digitalRead(buttonPins[i]);
   // LOW bedeutet gedrückt, da Pull-Up-Widerstand aktiv ist
   Joystick.setButton(i, buttonState == LOW ? 1 : 0);
 }
 
 delay(10);  // Polling-Intervall
}
 

License:

Standard Digital File License

Related Models

RamjetX Logitech to Thrustmaster Quick Release Adaptor Kit *** Updated 28/06/2020*** preview image

RamjetX Logitech to Thrustmaster Quick Release Adaptor Kit *** Updated 28/06/2020***

RamjetX profile image

RamjetX

288

Fanatec wheel wall mount for QR1 quick release adapter preview image

Fanatec wheel wall mount for QR1 quick release adapter

Hawk7 profile image

Hawk7

35

Sim Racing Flag/Spotter  preview image

Sim Racing Flag/Spotter

Luk profile image

Luk

74

Sim Racing Keyboard/Accessories joint 4545/4590 preview image

Sim Racing Keyboard/Accessories joint 4545/4590

PanattaBomber profile image

PanattaBomber

236

hoverboard DD FFBeast compact preview image

hoverboard DD FFBeast compact

Radson Patrick profile image

Radson Patrick

55

Sim Racing Round Revmeter with gear indicator preview image

Sim Racing Round Revmeter with gear indicator

Mark_McQ profile image

Mark_McQ

41

Keyboard holder - ALU 40x40 - new upload preview image

Keyboard holder - ALU 40x40 - new upload

pwistudio profile image

pwistudio

77

Peugeot 207 Gauges Stand preview image

Peugeot 207 Gauges Stand

Pro427 profile image

Pro427

3