THANK YOU! Finally! I have been asking for DCS-BIOS tutorial in forums for a year now! Such a poorly documented project. You see people with insane builds but with no directions on how you can replicate this. Please, go on with this series!
I didn't know any of this and I've been messing with arduino and DCS for several years. Opened up a whole new world for customization, thanks much mate.
This is brilliant! I've made joysticks, throttles, pedals and collectives and just when I thought I've researched it all, you make an introductory video and I learn something new:) Thanks mate!
Thank you for this!!!! Awesome video! I didn’t realize how cheap it is… it’s worth doing just for fun, but I can already tell this is gonna lead to a much bigger project!
A pro-micro running a script to do 100 mouse clicks per second if a toggle switch was triggered, really helped me spawn into airplanes in Battlefield 5 :) Just don't forget to toggle it again to not go through your ammo right away upon spawning.
Thanks for doing this, and the one you're proposing on DCS BIOS. I've been thinking about adding a few things to my setup and this is going to make it much easier. Thanks!
A better solution you can do in your code is to have it send that signal on a signal *rise* and a signal *fall* (this requires as far as I'm aware setting it up as an interrupt). Then when you move it to the on position, it sends the press, and when you move it to to the off position, same. Only downside is when you fire up he game you'd need to have already "reset" your switch positions. The reason I call it a better solution is it doesn't rely on a plugin that may flake out or be broken by an update. Love the content.
The idea to just send a short "button pressed" signal on a rising edge and another signal on a falling edge is a possible solution. But you don't need to set the pins in interrupt mode. You can also scan the pin periodically comparing the pin state with its state of the previous scan. If you see different values, you detected an edge and can send a "button pressed" signal for the corresponding button. To overcome the downside, you can re-send the corresponding signal periodically. But if the main goal of your solution is to not configure the sim to react to both button-states, there is a simpler solution: Just map each physical state of a switch to a direct-x button. The following code demonstrates this. #include Joystick_ Joystick; int pins[4] = {9, 10, 11, 12}; void setup() { for(int pin_no = 0; pin_no < 4; pin_no++) { pinMode(pins[pin_no], INPUT_PULLUP); } Joystick.begin(); } void loop() { for(int pin_no = 0; pin_no < 4; pin_no++) { int currentState = digitalRead(pins[pin_no]); Joystick.setButton(pin_no * 2 + currentState, 1); Joystick.setButton(pin_no * 2 + (currentState^1), 0); } }
Thumbs up before I have watched. Informative, straight to the point and easily found title. Great video, easily followed and if not on then off. Cheers.
1:05 The Leonardo is the same form factor as an Uno, but has the 32u4 processor with native USB. The Pro Micro may report as a Leonardo to the Arduino IDE, but it's not the same thing. 1:54 "...six inches long..."? 6:32 Whenever I first connect such a device, DCS tries to guess which binds to use, so it's a good idea to check and clear out if necessary the axis and non-axis binds of new devices. 7:02 Looks like you put the button on the Master Caution circuit breaker bind. 8:20 WRT on/off bindings. You can program the arduino to send another pulse of the same signal, or a different button press, when you turn the switch off. You can also use this to make "virtual buttons" for on-off-on switches to give 3 separate outputs. There's also a way to increase the maximum number of buttons to 128 if you need more virtual buttons. Does Quaggles cause problems with purity checks?
Hi mate. Wonderful videoI I am now researching how to build my own cockpit and how to do it economically. I find your videos are the best out there. It turns out a lot of the libraries in Finland has a lot of the tools needed. It cost me 0.70€ to fill up the Ultimaker 3 pro plate with buttons. The laser cutters cost 1€ a go, so I am finally getting something out of the ridiculous taxes we pay over here.
I have a bunch of Honeywell switches for my F-16 pit setup on my card and they work great. Including my Ejection seat handle keyboard emulated on the card to read when I eject.
I did something similar. I connected 10x8 pins in the grid( including tx an tx pin,no ground) and used joystick and keypad library to program it. I have 80 buttons that work( they are all self-centering switches). Now I am figuring out a design/ layout of the switches.
@thewarthogproject There is another way without using a mod.... pulldown Key/Button, and you will find an entry for "JOY_BTN2_off". Just bind that to the off position. This is after coding the Leonardo for joystick and bound within DCS... If it is a 3-way switch (center is off or open), bind up to one function, down to the other, and the middle to 2 "off" positions. Example the F-16 Arming is 3 position. Up - Arm, Middle - Off, Down - Simulate. If it is 2 way on/off switch, just do half of this. One position is the "button" the other is the "_off" input. It must be selected manually from the pulldown. Bind within DCS ; Arm - "JOY_BTN1" - up. Simulate - "JOY_BTN2" - down. The middle position will be bound as above using the "Key/Button" pulldown. Off - "JOY_BTN1_off, JOY_BTN2_off". Boom! Done!
The problem with the TGP switch is even easier to fix than you've shown, when you add a button to an action, it says the button number in the pop-up menu, just click on the number and select the button_x_off action instead of button_x, if you map both the on and off event to the toggle, it'll work as an on-off switch.
This was added in a recent update (without being mentioned in any release notes?), and i didnt even know it existed lol. Ill check it out and revisit this later.
I didn't know about Quaggles, very cool. I'm using mmjoy for my pro micro boards to make them appear as a generic joystick. I have made a custom circuit board I plug the pro micro into, supporting 64 buttons and 8 analog pins from a single pro micro and it's awesome. I'm almost done with a new version that bumps up to 128 buttons plus the 8 analog on a single pro micro🤘
The AH-64 controls have me wishing I knew how to 3D print my own custom assemblies and throw them together. The cyclic/collective I can make work with my Winwing/Warthog setup, but the CPG seat gets brutal with an X-Box controller and trying to fit 1,000 buttons and switches on the damn thing. Nice video, as always!
Just a heads up, I don't know exactly when DCS World added it but now you can assign a button's off position as another button press. Basically, you assign the button again but then click on "Key / Button" with your mouse and manually choose the same button but it will have "off" followed after it. Then you will see two button assignments for the same switch on the main controller screen. The switches work as they should after doing that. So, no mods or circuit setups that send a pulse to get an on/off switch to work in DCS anymore.
Thank you for uploading this. My f-18 simpit has almost a fully completed front panel. I have been wanting to know how to add my own switches for a while now. I use dcs bios with some premade switch boards built by tek creations but have a few buttons on my front cockpit that have 2 wires coming out of them but arent programmed or attached to anything so I need to learn how to do it myself. I know how to solder so that won't be a issue.
You can also program switches connected to one pin to act like two buttons. For example when switch is on-joystick button 1 is on for 200ms and when switch changes state to off- joystick button 2 is on for 200ms. This way you can have 36 joystick buttons connected to 18 buttons(18 pins+ground) which this board have. All switches can work at the same time , if you connected 10x8 pins with no ground you can have 80 buttons but a lot of them don't work at the same time. Basically you can do whatever you want.
On an on-off switch in Arduino you can just watch button state in loop, after the state change save it to variable and send a pulse/message to a PC. The only issue is when you close the game you should reset the buttons position manually.
Though it is sometimes hard to understand you, mate, it is great to have a pro showing the basics under the lid. What I would like to know is, how the maker of DCSbios access the API methods of the aircraft.
7:15 Problem is ED too lazy to program a Release to all the switches. Make it like MSFS 2020 where you can select activate or release for the same button. I use RS Mapper to get around it, but Quaggles looks a lot easier, since you don't have to use a separate program. Is there a profile for Quaggles you can save?
Lots have people have since told me DCS can do this natively since a recent update, although i havent tried it out yet because i had no idea it was possible. Ill revist it later on!
Wonderfully explained as always. One question lasts, if you use more than one Leonardo, is there a way to re-name the different Leonardos? I just remember my struggle with easy usb-game controllers, that where not recognized as different boards (in comparison with the Leo Bodnars where you could give them certain numbers).
Would love to see a video like this on your backlighting. I’m currently at that point with my Tomcat pit. I can make it work but the wiring never looks as nice as yours.
Thanks for sharing Quaggles, that's so useful. I gave up ages ago editing the game's lua files after every update. Do you know of any good tutorials on how to use and customise the joystick library?
Great video lots of helpful information? Could you please do another video on modifying Lua specifically for the Hud and the modifications you made with it and the Is a o a indicator
Thanks for this, gives me the push I need to get my cockpit going it’s easier than I thought. Quick question, how would we do a 3 position switch? If we solder both poles to inputs that’s well and good but DCS only allows one switch input for that 3 position switch and I’m assuming that would show up as two independent switches.
The typical workaround (I use) with switches in DCS is to assign TGP ON = JOY_BTN2 (on), and TGP OFF = JOY_BTN2 (on release). This is native to DCS and seems to work fine without the need for any third party apps.
i use this too but what i dont like is if your switches are out of sync at the start they stay out of sync. this is extra annoying if you are playing in something like a huey where the ai co pilot will sometimes flip switches randomly.
Thanks for making this I bought a one of the controllers and 3 non momentary switches just to learn this. It will be nice to use to make a wall cooling panel for the p51 and 47. How do I know where to solder the wires?
This on-off problem is one of my biggest complaints with the Thrustmaster Warthog Throttle. I’m checking out that mod now. Holy crap that will be a lifesaver, literally.
I’m having a real hard time trying to add more buttons. With that basic code pins 11 and 12 don’t exist. I’ve tried changing the pin numbers to other digital outputs but I can only get pins 9 and 10 working. Any advice??? Thanks, Nick in Sydney building an F5e simpit.
@ yeah mate, I watched another video and completely rewrote the entire code. It’s pretty different but I got the full digital buttons out of the pro-micro. I can email you the code. I suggest making a second email account in outlook or gmail and posting it here and I will email you the code. Or I can link the other video and copy his code word for word and just leave out the x,y,z joystick part.
@@Senoph this was the video I watched. When I coded it this way, it ended up being about 280? Lines of code. But at least I understand it and could see each step. ruclips.net/video/hoCOq9Ngp44/видео.htmlsi=cqih-_0gqh_lMvgk
@@zooknut thanks so much! This will help big time. I think youtube deleted my previous comment because of the email address being in it but the video should hopefully get me the code anyway. Thanks again.
I'm using toggles in DCS with a simple panel I made. You can get around the issue of having to throw the switch twice by using a simple if statement. should look something like this for the Joystick library. if (digitalRead(button1) == LOW) { Joystick.setButton(0, 1); } else { Joystick.setButton(0, 0); }
Great content. Now for the complicated question. If I have 75 switches to wire up, what is the preferred solution? Multiple Arduino boards plugged into a USB hub?
You could use a button matrix though you might run into issues with toggle switches using that, you can also have multiple Arduino's using one usb, one is the master that you plug into your computer and the others (slaves) are wired into the the master.
I's suggest looking into a large button matrix if you are only using pushbuttons (a matrix only really works well with momentary push button switches), or you could cascade a bunch of shift registers like the 74HC165's possibly.
You don't need that two position switch mod, you can alter the Arduino loop to make it send the on signal for the button on a state change instead of when it's on or off.
@@braitebrina5148 The program he's referring to lets you set up when a button is on or off independent of the input it gets, so you need only set it up to stop sending the signal after a few seconds. I'll give you some example code in a separate post.
What is the set-up of your visual cylindrical, like type of projector type of program to combine the 3 projectors image, computer capacity like all this stuffs
can u help me here. the library wont load into ide. it says internal library install movin etractred file to destinatiuon dir is there another library like this one u have here
I am attempting to build a couple of basic button boxes and I wasnt aware such a mod existed, however, after downloading all input commnds from munkwolf I have discovered that all the files are blank!!
Noob question. Toggle switch when it is ON is like to push and hold button on a keyboard, right? AFAIK, Windows and games (WarThunder to be specific) do not support the state when 3 buttons are held simultaneously. It means that if you hold 3 buttons, the system will not recognize if you push the 4th button. So, is there a problem, when you have 3 toggles swithes ON? I hope I explained my question.
Hello, excuse me three-leg three-gear toggle switch in DCS how to achieve three independent switch control? Excuse me is FreeJoy STM32 board how to achieve three independent switch?
I have a question. I want to use the same concept but in a different game (assetto Corsa competizione) someone has a solution for that? Like an app or anything that i can use?
hey i get around the issue with the toggle switch by using a simple if statement in the arduino code i am using a similar libary for an raspberry pi pico i am intrested if u know a way to get lights working on the pico?
Are you sure you cannot solve the toggle switch problem with software in the Arduino. You can tell it to give a single pulse every time it changes level from 0 0.
dcs dont have toggles commands like some fps allow aim,chrought, sprint and other functions 2b toggle so you press it once start,press twice it release instead of having to hold that button on a state
You should be able to just change the code so that it sends a signal whenever the state of the switch changes. You just save the last state in a boolean variable and send the signal when it isn't the same.
Don't listen to the haters. Despite what anyone says, it is absolutley six inches, which is the normal average size.
Normal?!?!?!? THATS HUGE!
5.5 is normal actually
Girth is important…
@@tbmm2centimetres, right? RIGHT?
@@Zolbat tehe :3
THANK YOU! Finally! I have been asking for DCS-BIOS tutorial in forums for a year now! Such a poorly documented project. You see people with insane builds but with no directions on how you can replicate this. Please, go on with this series!
I didn't know any of this and I've been messing with arduino and DCS for several years. Opened up a whole new world for customization, thanks much mate.
There goes all your free time 😁😁
This is brilliant! I've made joysticks, throttles, pedals and collectives and just when I thought I've researched it all, you make an introductory video and I learn something new:) Thanks mate!
@repentandbelieveinJesusChrist8 Thanks? I'm Jewish
Thank you for this!!!! Awesome video! I didn’t realize how cheap it is… it’s worth doing just for fun, but I can already tell this is gonna lead to a much bigger project!
A pro-micro running a script to do 100 mouse clicks per second if a toggle switch was triggered, really helped me spawn into airplanes in Battlefield 5 :) Just don't forget to toggle it again to not go through your ammo right away upon spawning.
Thanks for this. I have always thought about building a simpit and now I have a reason to do it with quick tutorials like this one.
Super cool! One of those things I've thought about countless times yet never really sat down to dig in. Thanks for sharing!
I hope this will be a full series of basics videos.
Thanks for doing this, and the one you're proposing on DCS BIOS. I've been thinking about adding a few things to my setup and this is going to make it much easier. Thanks!
A better solution you can do in your code is to have it send that signal on a signal *rise* and a signal *fall* (this requires as far as I'm aware setting it up as an interrupt). Then when you move it to the on position, it sends the press, and when you move it to to the off position, same. Only downside is when you fire up he game you'd need to have already "reset" your switch positions. The reason I call it a better solution is it doesn't rely on a plugin that may flake out or be broken by an update. Love the content.
The idea to just send a short "button pressed" signal on a rising edge and another signal on a falling edge is a possible solution. But you don't need to set the pins in interrupt mode. You can also scan the pin periodically comparing the pin state with its state of the previous scan. If you see different values, you detected an edge and can send a "button pressed" signal for the corresponding button. To overcome the downside, you can re-send the corresponding signal periodically.
But if the main goal of your solution is to not configure the sim to react to both button-states, there is a simpler solution: Just map each physical state of a switch to a direct-x button. The following code demonstrates this.
#include
Joystick_ Joystick;
int pins[4] = {9, 10, 11, 12};
void setup()
{
for(int pin_no = 0; pin_no < 4; pin_no++)
{
pinMode(pins[pin_no], INPUT_PULLUP);
}
Joystick.begin();
}
void loop()
{
for(int pin_no = 0; pin_no < 4; pin_no++)
{
int currentState = digitalRead(pins[pin_no]);
Joystick.setButton(pin_no * 2 + currentState, 1);
Joystick.setButton(pin_no * 2 + (currentState^1), 0);
}
}
You are a GOAT in the sim world! I've been following your project for years.
Thumbs up before I have watched. Informative, straight to the point and easily found title.
Great video, easily followed and if not on then off. Cheers.
1:05 The Leonardo is the same form factor as an Uno, but has the 32u4 processor with native USB. The Pro Micro may report as a Leonardo to the Arduino IDE, but it's not the same thing.
1:54 "...six inches long..."?
6:32 Whenever I first connect such a device, DCS tries to guess which binds to use, so it's a good idea to check and clear out if necessary the axis and non-axis binds of new devices.
7:02 Looks like you put the button on the Master Caution circuit breaker bind.
8:20 WRT on/off bindings. You can program the arduino to send another pulse of the same signal, or a different button press, when you turn the switch off. You can also use this to make "virtual buttons" for on-off-on switches to give 3 separate outputs.
There's also a way to increase the maximum number of buttons to 128 if you need more virtual buttons.
Does Quaggles cause problems with purity checks?
Damn you for rekindling the fire to get back to doing this. 😂. Super helpful. Thanks
After this video i definitely decided to get into a project and start made my button box for DCS. Thanks for all your video. 🙏
Hi mate. Wonderful videoI I am now researching how to build my own cockpit and how to do it economically. I find your videos are the best out there.
It turns out a lot of the libraries in Finland has a lot of the tools needed. It cost me 0.70€ to fill up the Ultimaker 3 pro plate with buttons. The laser cutters cost 1€ a go, so I am finally getting something out of the ridiculous taxes we pay over here.
Great video and would love to see more videos like this!
I have a bunch of Honeywell switches for my F-16 pit setup on my card and they work great. Including my Ejection seat handle keyboard emulated on the card to read when I eject.
Very instructive thanks for sharing your knowledge, also planning to start on f18 at some point.
I did something similar. I connected 10x8 pins in the grid( including tx an tx pin,no ground) and used joystick and keypad library to program it. I have 80 buttons that work( they are all self-centering switches). Now I am figuring out a design/ layout of the switches.
@thewarthogproject There is another way without using a mod.... pulldown Key/Button, and you will find an entry for "JOY_BTN2_off". Just bind that to the off position. This is after coding the Leonardo for joystick and bound within DCS...
If it is a 3-way switch (center is off or open), bind up to one function, down to the other, and the middle to 2 "off" positions. Example the F-16 Arming is 3 position. Up - Arm, Middle - Off, Down - Simulate. If it is 2 way on/off switch, just do half of this. One position is the "button" the other is the "_off" input. It must be selected manually from the pulldown.
Bind within DCS ; Arm - "JOY_BTN1" - up. Simulate - "JOY_BTN2" - down. The middle position will be bound as above using the "Key/Button" pulldown. Off - "JOY_BTN1_off, JOY_BTN2_off". Boom! Done!
Best video ever! Please keep this kind of stuff coming! 🙏
I have no use for this currently but it was very useful thanks 👍
The problem with the TGP switch is even easier to fix than you've shown, when you add a button to an action, it says the button number in the pop-up menu, just click on the number and select the button_x_off action instead of button_x, if you map both the on and off event to the toggle, it'll work as an on-off switch.
This was added in a recent update (without being mentioned in any release notes?), and i didnt even know it existed lol. Ill check it out and revisit this later.
@@thewarthogproject Seems like it, I saw a RUclips short telling people about the feature, but I'm not sure for how long it's been in the game.
I didn't know about Quaggles, very cool. I'm using mmjoy for my pro micro boards to make them appear as a generic joystick. I have made a custom circuit board I plug the pro micro into, supporting 64 buttons and 8 analog pins from a single pro micro and it's awesome. I'm almost done with a new version that bumps up to 128 buttons plus the 8 analog on a single pro micro🤘
You need to share that board :)
@@DonaldMcMuffin I plan to after I get the new version proven out 👍
Yea, where is your content video? I want to see how to do many buttons :)
The AH-64 controls have me wishing I knew how to 3D print my own custom assemblies and throw them together. The cyclic/collective I can make work with my Winwing/Warthog setup, but the CPG seat gets brutal with an X-Box controller and trying to fit 1,000 buttons and switches on the damn thing.
Nice video, as always!
If you need help I got. I fix the apache for my job. So if you need any help I gotcha if it's within what I'm allowed
Thanks, great timing for this info.
Just a heads up, I don't know exactly when DCS World added it but now you can assign a button's off position as another button press. Basically, you assign the button again but then click on "Key / Button" with your mouse and manually choose the same button but it will have "off" followed after it. Then you will see two button assignments for the same switch on the main controller screen. The switches work as they should after doing that. So, no mods or circuit setups that send a pulse to get an on/off switch to work in DCS anymore.
I found a video that explains it if what I was saying was confusing. ruclips.net/video/c_sLvZptnIk/видео.htmlsi=y6M5RUiJu0I1R7kv
Thank you for uploading this. My f-18 simpit has almost a fully completed front panel. I have been wanting to know how to add my own switches for a while now. I use dcs bios with some premade switch boards built by tek creations but have a few buttons on my front cockpit that have 2 wires coming out of them but arent programmed or attached to anything so I need to learn how to do it myself. I know how to solder so that won't be a issue.
You can also program switches connected to one pin to act like two buttons. For example when switch is on-joystick button 1 is on for 200ms and when switch changes state to off- joystick button 2 is on for 200ms. This way you can have 36 joystick buttons connected to 18 buttons(18 pins+ground) which this board have. All switches can work at the same time , if you connected 10x8 pins with no ground you can have 80 buttons but a lot of them don't work at the same time. Basically you can do whatever you want.
"Hello, I'd like to ask you some questions about what just happened". lol
thanks for getting back to basics! love it!
por fin encuentro lo que necesita , Gracias por compartir tus conocimientos
Awesome video! Thanks for sharing your experience.
The Pro Micro is a great little micro. With multiplexer chips you can even have dozens of switches and buttons
Can't wait for that other vid on how to handle commands that the community project is missing
On an on-off switch in Arduino you can just watch button state in loop, after the state change save it to variable and send a pulse/message to a PC. The only issue is when you close the game you should reset the buttons position manually.
Though it is sometimes hard to understand you, mate, it is great to have a pro showing the basics under the lid. What I would like to know is, how the maker of DCSbios access the API methods of the aircraft.
Hey warthog, long time no hear. Coincidentally I messaged you not so long ago on Instagram about this topic, great to hear from you again
I love listening to Aussies curse. Friggin hilarious.
7:15 Problem is ED too lazy to program a Release to all the switches. Make it like MSFS 2020 where you can select activate or release for the same button. I use RS Mapper to get around it, but Quaggles looks a lot easier, since you don't have to use a separate program. Is there a profile for Quaggles you can save?
Lots have people have since told me DCS can do this natively since a recent update, although i havent tried it out yet because i had no idea it was possible. Ill revist it later on!
@The_Warthog_Project , these are very instructional. I'm wondering if you have or use Rotary Encoders and what library do use for them? Thanks.
LOVE this video, so helpful, thank you!
Cool video, thanks! 👍🏻🙋🏼♂️🍻🍻
Freakin cool! I'm not really interested in doing this but it sure is fascinating
7:18 Wouldn't the "Switch OFF" option in the DCS controller editor work for this?
Wonderfully explained as always. One question lasts, if you use more than one Leonardo, is there a way to re-name the different Leonardos?
I just remember my struggle with easy usb-game controllers, that where not recognized as different boards (in comparison with the Leo Bodnars where you could give them certain numbers).
Yes, you can change the name of the device, and its ID in the boards configuration file in Arduino
Would love to see a video like this on your backlighting. I’m currently at that point with my Tomcat pit. I can make it work but the wiring never looks as nice as yours.
Great vedio plz make more like this for falcon bms as well good job
@6:10 🤣😂 the pain is real
Thanks for sharing Quaggles, that's so useful. I gave up ages ago editing the game's lua files after every update.
Do you know of any good tutorials on how to use and customise the joystick library?
How to build a button box, by wim
Absolutely amazing the work you’ve done.
Hi. Will be making your 180 screen. What was the radius you used. Enjoying the content. Thanks
Great video lots of helpful information? Could you please do another video on modifying Lua specifically for the Hud and the modifications you made with it and the Is a o a indicator
I'd expected slap at the end xD
Thank you very much for this video ! 👏🏻
Thanks for this, gives me the push I need to get my cockpit going it’s easier than I thought. Quick question, how would we do a 3 position switch? If we solder both poles to inputs that’s well and good but DCS only allows one switch input for that 3 position switch and I’m assuming that would show up as two independent switches.
The metal gear music ❤
The typical workaround (I use) with switches in DCS is to assign TGP ON = JOY_BTN2 (on), and TGP OFF = JOY_BTN2 (on release). This is native to DCS and seems to work fine without the need for any third party apps.
i use this too but what i dont like is if your switches are out of sync at the start they stay out of sync. this is extra annoying if you are playing in something like a huey where the ai co pilot will sometimes flip switches randomly.
@@patty_cakes5596 That's why I made all my switches momentary, so there will never be a mismatch between the hardware and the game.
Great video, how do you add more pin modes to that? It’s only allowing 4 pins to be connected..
Thanks for making this
I bought a one of the controllers and 3 non momentary switches just to learn this.
It will be nice to use to make a wall cooling panel for the p51 and 47.
How do I know where to solder the wires?
This on-off problem is one of my biggest complaints with the Thrustmaster Warthog Throttle. I’m checking out that mod now. Holy crap that will be a lifesaver, literally.
@thewarthogproject how do you tie multiple grounds together on the micro?
Thanks a lot man, youre a life saver. Just one question: can you actually connect any switch to this card (specifically rotary switches)?
keyboards definitely do send separate signals for keyup and keydown
I’m having a real hard time trying to add more buttons. With that basic code pins 11 and 12 don’t exist. I’ve tried changing the pin numbers to other digital outputs but I can only get pins 9 and 10 working.
Any advice???
Thanks,
Nick in Sydney building an F5e simpit.
Hey man, I'm having the same problem. Did you figure it out in the end? Thanks.
@ yeah mate, I watched another video and completely rewrote the entire code. It’s pretty different but I got the full digital buttons out of the pro-micro. I can email you the code. I suggest making a second email account in outlook or gmail and posting it here and I will email you the code. Or I can link the other video and copy his code word for word and just leave out the x,y,z joystick part.
@@Senoph this was the video I watched. When I coded it this way, it ended up being about 280? Lines of code. But at least I understand it and could see each step.
ruclips.net/video/hoCOq9Ngp44/видео.htmlsi=cqih-_0gqh_lMvgk
@@zooknut thanks so much! This will help big time. I think youtube deleted my previous comment because of the email address being in it but the video should hopefully get me the code anyway. Thanks again.
How can i connect more than 32 buttons at once?
Can you please link a version of that Arduino code that does not have a limit to how much buttons is programmed? Please and thank you.
Did you get that? I’m looking for help with that
I'm using toggles in DCS with a simple panel I made. You can get around the issue of having to throw the switch twice by using a simple if statement. should look something like this for the Joystick library.
if (digitalRead(button1) == LOW) {
Joystick.setButton(0, 1);
}
else {
Joystick.setButton(0, 0);
}
Great content. Now for the complicated question. If I have 75 switches to wire up, what is the preferred solution? Multiple Arduino boards plugged into a USB hub?
You could use a button matrix though you might run into issues with toggle switches using that, you can also have multiple Arduino's using one usb, one is the master that you plug into your computer and the others (slaves) are wired into the the master.
I's suggest looking into a large button matrix if you are only using pushbuttons (a matrix only really works well with momentary push button switches), or you could cascade a bunch of shift registers like the 74HC165's possibly.
Thank you! This is awesome.
You don't need that two position switch mod, you can alter the Arduino loop to make it send the on signal for the button on a state change instead of when it's on or off.
how?
@@braitebrina5148 The program he's referring to lets you set up when a button is on or off independent of the input it gets, so you need only set it up to stop sending the signal after a few seconds.
I'll give you some example code in a separate post.
@@braitebrina5148
#include
Joystick_ Joystick;
void setup() {
// Initialize Button Pins
pinMode(9, INPUT_PULLUP);
pinMode(10, INPUT_PULLUP);
pinMode(11, INPUT_PULLUP);
pinMode(12, INPUT_PULLUP);
// Initialize Joystick Library
Joystick.begin();
}
// Constant that maps the phyical pin to the joystick Switch.
const int pinToSwitchMap = 9;
// Last state of the Switch.
uint8_t lastSwitchState[4] = {0,0,0,0};
// Time of last change.
unsigned long lastStateChange[4] = {0,0,0,0};
void loop() {
// Read pin values
for (int index = 0; index < 4; index++)
{
int currentSwitchState = !digitalRead(index + pinToSwitchMap);
if (currentSwitchState != lastSwitchState[index])
{
Joystick.pressButton(index);
lastSwitchState[index] = currentSwitchState;
lastStateChange[index] = millis();
}
if (millis() > (lastStateChange[index] + 100))
{
Joystick.releaseButton(index);
lastStateChange[index] = millis() + 1000;
}
}
delay(50);
}
How would you set this up with a 4x4 matrix keypad?
A quick way to open up the game controller interface is to type 'joy' into the start menu.
Would you need the community files/mods for the switch with the recent update to DCS binding system (ie. the ability to map a release to a function?)
I had no idea this update even existed. May have to have a look and revist this one later.
What is the set-up of your visual cylindrical, like type of projector type of program to combine the 3 projectors image, computer capacity like all this stuffs
Have a look thrugh the youtube channel or go to www.thewarthogproject.com
Is this what you did with your CRS and HDG knob by chance?
Does the quaglea mod affect integrity check for multiplayer servers?
No, not that I've found so far.
can u help me here. the library wont load into ide. it says internal library install movin etractred file to destinatiuon dir
is there another library like this one u have here
I am attempting to build a couple of basic button boxes and I wasnt aware such a mod existed, however, after downloading all input commnds from munkwolf I have discovered that all the files are blank!!
Is this a standard 240V switch or a DC12V switch? Will it make any difference?
what wires are you using? do just any wires work for this?
Short question. How many switches can i use per adueino?
Noob question.
Toggle switch when it is ON is like to push and hold button on a keyboard, right?
AFAIK, Windows and games (WarThunder to be specific) do not support the state when 3 buttons are held simultaneously.
It means that if you hold 3 buttons, the system will not recognize if you push the 4th button.
So, is there a problem, when you have 3 toggles swithes ON?
I hope I explained my question.
Will this work for Su-25t and can I put multyple switches to a single arduino. Also can I use only the switches with the same schematic t
do you prefer this method over using the DCS Bios and std arduino like you used in your build?
Ive mixed and match both. I use this method for the panels that only have switches, and DCS-BIOS for the panels that need an LED or display.
@@thewarthogproject Brilliant thanks for the info. Your videos are ace. i mustve watched nearly all of them.
Hello, excuse me three-leg three-gear toggle switch in DCS how to achieve three independent switch control? Excuse me is FreeJoy STM32 board how to achieve three independent switch?
I have a question. I want to use the same concept but in a different game (assetto Corsa competizione) someone has a solution for that? Like an app or anything that i can use?
LMAO the ending!!
Does this method work with 3 way switches too?
Hahahahaha alesst 6" you say 😂😅 nice one
How does "Arduino Joystick Library" compare to MMJoy?
Just excellent !!!
hey i get around the issue with the toggle switch by using a simple if statement in the arduino code i am using a similar libary for an raspberry pi pico i am intrested if u know a way to get lights working on the pico?
Are you sure you cannot solve the toggle switch problem with software in the Arduino.
You can tell it to give a single pulse every time it changes level from 0 0.
dcs dont have toggles commands
like some fps allow aim,chrought, sprint and other functions 2b toggle so you press it once start,press twice it release instead of having to hold that button on a state
I just use the JOY # Off setting in grey within stock DCS control settings. Does this not work for everyone?
I didnt know this update even occurred. Ill have to check it out.
You should be able to just change the code so that it sends a signal whenever the state of the switch changes. You just save the last state in a boolean variable and send the signal when it isn't the same.
im first😀 thanks for the vid as i want to build my own cockpit for the f18