DIY Button Box Help

Just have a quick question. I'm building a button box for PC2 and iRacing. Ill be using a circuit board from an old PC controller. I was wondering what software I should use. My only concern is I the headlights on an acutall switch instead of a momentary button. I would like the lights to come on when I turn the switch on and off when I turn the switch off. Is that possible? Appreciate any help I can get!
 
The problem is that the games don't work with switches (which would act as a button always pressed or not pressed at all). They wouldn't even know either the state of the switch when you restart the track. What most users do is a little trick: use a momentary switch (goes back to the initial position), which acts as a button but at least looks like a switch. It's not what you want, but I'm afraid it's the only solution as far as the games are programmed the way they are.
 
Upvote 0
Elaphe is right. Switches are a bad idea.
But, as mentioned "self centering momentary toggle switches" do exist and those work just fine as buttons. (Google it for images.)

I bought few for my DIY button box for this exact reason. Mine are on-off-on switches so I could wire i.e. button 1 and 2 both in one switch. That way I can use one switch to adjust, let's say boost. Toggle up for more, and toggle down for less.

And btw, if you find it difficult to rewire and rebutton an old controller PCB, you might want to google up "zero delay arcade usb encoder." Those are cheap and easy to work with.

On software side you might want to look at JoyToKey. I purchased a license after I tried it out. Makes it easier to map everything properly in games.
 
Last edited:
Upvote 0
I've been thinking about it for a while and I've written a script in AutoHotkey to test it. This may work, but ony with games that don't switch the lights on automatically. It should be running in the background with a timer that constantly gets the switch state. If off, the code do nothing and returns. If on, it will send the key to toggle the lights on/off, which you must configure in your game, deactivates the timer and activates a new timer that does the same but checking then switch goes off. The same would be applicable for wipers, for instance. This will work, but the problem is when you leave the track with the switch on. Next time you enter your car, since the car lights are off by default in the game, the switch function would be reversed. How to overcome this problem? I don't know.
 
Upvote 0
This will work, but the problem is when you leave the track with the switch on. Next time you enter your car, since the car lights are off by default in the game, the switch function would be reversed. How to overcome this problem? I don't know.

Yup, that's always been the problem for using a headlight switch. Somehow you need to get the state of the switch as the game believes it is set, which would mean a software plugin. I don't know if the headlight state is available in any games via the plugin interface.
 
Upvote 0

RaceDepartment Store

  • Featured
The R9's 9N·m of torque can simulate a full range of steering forces and car handling characteristics. Buy now from Moza Racing ($439,00) Minimum Weight & Maximum Torque Maximum torque from a compact body. Aviation Grade Aluminium Alloy Housing Unmatched quality and durability. The MOZA R9's...
  • Featured
GT racing style wheel. Standard 300 mm GT wheel diameter. Grab ahold of the GS wheel and have a real racing experience. Buy now from MOZA Racing ($499,00) Alcantara® Made In Italy The GS is wrapped in Italian made Alcantara which feels exquisite. Forged Carbon Fibre Framework & Shifter Paddle...
  • Featured
Made from high-strength steel to ensure superior quality and exceptional endurance, the MOZA SRP Pedals come with adjustable pedal spacing and can be directly connected to a PC through the USB port. Buy now from Moza Racing ($39.90 – $218.90) With a high-precision pressure sensor of up to...
  • Featured
Comfortableness is just as important as performance. The Alcantara made in Italy offers you luxury supercar hand feel. For racers who prefer geniune leather, the fine graine leather will never let you down. Buy now from MOZA Racing ($499,00) Forged Carbon Fiber Magnetic Shifter The steering...
  • Featured
Real-Time Data Displayed in Panoramic HD Buy now from MOZA Racing ($299,00) Large Full Color HD Digital Dash At 5-inches with 16.7 million colors, and a screen resolution of 800x480. Drivers have a stunning digital dash that can display car status, lap times, and more. Aluminum Alloy Frame...
  • Featured
The colors of black and gold were chosen to bring out the competitive spirit of the driver. The CRP pedal’s design incorporates the essence of hyper car styling. Buy now from MOZA Racing ($499,00) Aluminum Alloy Pedal Assembly Almost every part of the CRP is made of CNC aluminum alloy...
Top