karkka Posted February 4, 2015 Posted February 4, 2015 Hi. I was just thinking about that it would be nice to have a small panel when playing. It´s not so fun to just press on the keyboard. I made a simple paint pic of what I have in mind. What do you think. Am I missing something, essential buttons? I think that I would try to get this to work with Arduino, maybe ad some LEDs to. Is it going to work? I also need some advice on how to do it. Ive read about connecting Arduino to DCS but is it only work A10c? Windows 10 pro 64bit | Intel I7 4790K@ 4GHz | 24GB Crucial ballistix sport 1600MHz DDR3 | ASUS Strix GTX1080Ti OC | Crucial mx 100 250Gb SSD | Crucial mx 300 520Gb SSD "Game disc"| Samsung 1Tb HDD |
FSFIan Posted February 4, 2015 Posted February 4, 2015 I think that I would try to get this to work with Arduino, maybe ad some LEDs to. Is it going to work? I also need some advice on how to do it. Ive read about connecting Arduino to DCS but is it only work A10c? You can connect an Arduino to any DCS aircraft. The level of interaction that is possible and the amount of effort it requires depends on your aircraft. For FC3-level aircraft, the amount of data you can get out of DCS through Export.lua is very limited (basics like pitch, bank, heading, altitude, but not the state of every single switch and indicator light). The commands you can send are generally limited to those you can also bind via the DCS options (as opposed to the "clickable cockpit" aircraft, where you can set the absolute state of most toggle switches even if the DCS options only have a "toggle" binding available). Where did you get the idea that the A-10C is the only aircraft that can be connected to an Arduino? DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
Extranajero Posted February 4, 2015 Posted February 4, 2015 You might want to think about binding some other functions to the panel - ones you might actually use to fight ? Stuff like the radar modes and weapons ? If you don't already have them mapped to a joystick of course... --------------------------------------------------------- PC specs:- Intel 386DX, 2mb memory, onboard graphics, 14" 640x480 monitor Modules owned:- Bachem Natter, Cessna 150, Project Pluto, Sopwith Snipe
karkka Posted February 4, 2015 Author Posted February 4, 2015 Thanks for the reply. How can it be a difference, A10c and SU-27 both have the option in option to choose what key to press to do an action. Fully clickable or not. Why would there be a problem to replace the keyboard with panel with switches. Is there a difference to assign or bind a key? I read something about DCS and Arduino and maybe it was a specific program that worked with a10c for the moment. It´s not easy to know and understand everything perfect when English ins´t your first language. Windows 10 pro 64bit | Intel I7 4790K@ 4GHz | 24GB Crucial ballistix sport 1600MHz DDR3 | ASUS Strix GTX1080Ti OC | Crucial mx 100 250Gb SSD | Crucial mx 300 520Gb SSD "Game disc"| Samsung 1Tb HDD |
karkka Posted February 4, 2015 Author Posted February 4, 2015 You might want to think about binding some other functions to the panel - ones you might actually use to fight ? Stuff like the radar modes and weapons ? If you don't already have them mapped to a joystick of course... I will have some of them on the stick. like scan up/down/left/right on one of the hat switch. It´s not that easy to know what keys to have or not. Windows 10 pro 64bit | Intel I7 4790K@ 4GHz | 24GB Crucial ballistix sport 1600MHz DDR3 | ASUS Strix GTX1080Ti OC | Crucial mx 100 250Gb SSD | Crucial mx 300 520Gb SSD "Game disc"| Samsung 1Tb HDD |
Extranajero Posted February 4, 2015 Posted February 4, 2015 Well I would assign your buttons on your panel to combat functions. You only need your engine switches ( etc ) once, why not assign your inputs to something which will help you ? --------------------------------------------------------- PC specs:- Intel 386DX, 2mb memory, onboard graphics, 14" 640x480 monitor Modules owned:- Bachem Natter, Cessna 150, Project Pluto, Sopwith Snipe
FSFIan Posted February 5, 2015 Posted February 5, 2015 Thanks for the reply. How can it be a difference, A10c and SU-27 both have the option in option to choose what key to press to do an action. Fully clickable or not. Why would there be a problem to replace the keyboard with panel with switches. There is no difference if by "switch" you mean "push button". Things get interesting when you consider, for example, toggle switches. The CICU on/off switch in the A-10C is a good example. In the DCS options, there is only a "CICU on/off" keybinding. If you have a real toggle switch on your panel and your microcontroller detects that this was just switched to the "on" position, you want to tell DCS "put the CICU switch to ON" (and because the A-10C has a clickable cockpit, you can through Export.lua). If the A-10C were a FC3 aircraft, you could only tell DCS to "toggle the CICU switch", which would give the wrong result when the switch in the virtual cockpit was already on. The other major difference between FC3 and "clickable cockpit" aircraft is in the amount of available data. When you said "maybe add some LEDs", what exactly were you thinking about? Unfortunately, chances are that there is no way to get the status of an individual indicator light in a FC3 plane. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
Boltz Posted February 5, 2015 Posted February 5, 2015 Hi karkka, If you want your panel to work easily with many different modules then you would be best changing your Arduino into a Joystick HID and assigning all the buttons in game. Ian's point about some of the switches only having a toggle option shouldn't affect you if you keep to basic controls or ensure that your switches are in the correct physical positions before you click fly. Adding LEDs will complicate things for you since you will need to export them through the export.lua and will not be able to use your Arduino as an HID for the switches as well. If you want to use many different aircraft then I recommend you look at the HID option and don't bother with any LEDs or output at this stage. Boltz A-10C Cockpit Build Thread My YouTube Channel
Extranajero Posted February 5, 2015 Posted February 5, 2015 Arduino as a HID is a really quick way to get what you are looking for. --------------------------------------------------------- PC specs:- Intel 386DX, 2mb memory, onboard graphics, 14" 640x480 monitor Modules owned:- Bachem Natter, Cessna 150, Project Pluto, Sopwith Snipe
karkka Posted February 5, 2015 Author Posted February 5, 2015 Ian;2311142']There is no difference if by "switch" you mean "push button". Things get interesting when you consider, for example, toggle switches. The CICU on/off switch in the A-10C is a good example. In the DCS options, there is only a "CICU on/off" keybinding. If you have a real toggle switch on your panel and your microcontroller detects that this was just switched to the "on" position, you want to tell DCS "put the CICU switch to ON" (and because the A-10C has a clickable cockpit, you can through Export.lua). If the A-10C were a FC3 aircraft, you could only tell DCS to "toggle the CICU switch", which would give the wrong result when the switch in the virtual cockpit was already on. The other major difference between FC3 and "clickable cockpit" aircraft is in the amount of available data. When you said "maybe add some LEDs", what exactly were you thinking about? Unfortunately, chances are that there is no way to get the status of an individual indicator light in a FC3 plane. Now I think I understand :P Okey so for the SU-27 panel. I mean both switch and pushbutton. But so to get this to work I can´t have those switch that stav in one position, It has to return just like the switch on my x-55 rhino. About LEDs..... I dont going have it. Windows 10 pro 64bit | Intel I7 4790K@ 4GHz | 24GB Crucial ballistix sport 1600MHz DDR3 | ASUS Strix GTX1080Ti OC | Crucial mx 100 250Gb SSD | Crucial mx 300 520Gb SSD "Game disc"| Samsung 1Tb HDD |
Extranajero Posted February 5, 2015 Posted February 5, 2015 But so to get this to work I can´t have those switch that stav in one position, It has to return just like the switch on my x-55 rhino. No, you can have switches, it doesn't have to be a pushbutton. You would write the sketch so that the Arduino sends a command to do whatever you want ( toggle lights as an example ) when it changes position. But before entering the cockpit in DCS you will have to make sure that the switches correspond to where they normally are. Like the landing gear, if you start on the ground then it should be down, in the air up of course. If not the switches will still work, but backwards. I hope you can understand all that and I haven't confused you :D What you are planning to do isn't too difficult, I am not a programmer but I managed it - and if I can do it, anyone can :smilewink: --------------------------------------------------------- PC specs:- Intel 386DX, 2mb memory, onboard graphics, 14" 640x480 monitor Modules owned:- Bachem Natter, Cessna 150, Project Pluto, Sopwith Snipe
FSFIan Posted February 5, 2015 Posted February 5, 2015 You can program a real toggle switch to send a "toggle" command each time it is flipped. If you do end up in a situation where the physical switch is out-of-sync with the virtual one, flip the virtual one with the keyboard to match them up. And as long as there is a separate action in DCS for each switch setting, you can also use switches that have more than two positions. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
karkka Posted February 7, 2015 Author Posted February 7, 2015 I was looking through my old boxes with electrical components and found around 100 different types of switches but every one stays in one position not returning. it was both 0n-0n, on-off-on, potentiometers, so you mean I have to flip it back to off to mimic the keys on a keyboard? I also read a little about DCS BIOS. Windows 10 pro 64bit | Intel I7 4790K@ 4GHz | 24GB Crucial ballistix sport 1600MHz DDR3 | ASUS Strix GTX1080Ti OC | Crucial mx 100 250Gb SSD | Crucial mx 300 520Gb SSD "Game disc"| Samsung 1Tb HDD |
FSFIan Posted February 7, 2015 Posted February 7, 2015 I was looking through my old boxes with electrical components and found around 100 different types of switches but every one stays in one position not returning. it was both 0n-0n, on-off-on, potentiometers, so you mean I have to flip it back to off to mimic the keys on a keyboard? Only if you treat them as push buttons. You can program your Arduino board to push and release a joystick button (or send a "TOGGLE" action if you are using DCS-BIOS) every time the switch changes state. That will make your toggle switch work as long as it starts out "in sync" with the sim. I think the Leo Bodnar boards have a similar feature. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
karkka Posted February 7, 2015 Author Posted February 7, 2015 Dumb question, how do I know how treat them as button and what else can I treat them as? I understand what you mean. but what is the best way to program it? I dont have an arduino so what type is best to buy? I think the best way is to flip it back because then you dont have to worry about out of sync, right?. Windows 10 pro 64bit | Intel I7 4790K@ 4GHz | 24GB Crucial ballistix sport 1600MHz DDR3 | ASUS Strix GTX1080Ti OC | Crucial mx 100 250Gb SSD | Crucial mx 300 520Gb SSD "Game disc"| Samsung 1Tb HDD |
karkka Posted February 10, 2015 Author Posted February 10, 2015 I just ordered a Arduino Nona to try it out I hope I can manage to get it to work. So I have to install DCS-bios and the Arduino software Windows 10 pro 64bit | Intel I7 4790K@ 4GHz | 24GB Crucial ballistix sport 1600MHz DDR3 | ASUS Strix GTX1080Ti OC | Crucial mx 100 250Gb SSD | Crucial mx 300 520Gb SSD "Game disc"| Samsung 1Tb HDD |
Boltz Posted February 10, 2015 Posted February 10, 2015 As far as I am aware DCS-BIOS only has support for the A-10 and Huey at the moment. Look up something like "arduino HID joystick controller" then you will be able to use it with other aircraft as well. A-10C Cockpit Build Thread My YouTube Channel
karkka Posted February 10, 2015 Author Posted February 10, 2015 I read about that too. I was thinking about to follow Overpros guide hope it works with Nano. I still dont know how to connect the switches. Lets say i have 10. 8 on- off and 2 on-off-on. can i just run a - wire to all "off" on the switches and then wire the other connection to the pins on the Arduino? Made a simple paint pic of what I mean. Can I also use the "A" pins Analog? to connect more switches or can I make an matrix? Windows 10 pro 64bit | Intel I7 4790K@ 4GHz | 24GB Crucial ballistix sport 1600MHz DDR3 | ASUS Strix GTX1080Ti OC | Crucial mx 100 250Gb SSD | Crucial mx 300 520Gb SSD "Game disc"| Samsung 1Tb HDD |
KLR Rico Posted February 10, 2015 Posted February 10, 2015 Can I also use the "A" pins Analog? to connect more switches or can I make an matrix? Yes, and yes. i5-4670K@4.5GHz / 16 GB RAM / SSD / GTX1080 Rift CV1 / G-seat / modded FFB HOTAS
karkka Posted February 11, 2015 Author Posted February 11, 2015 What about my pic, is it correct or should I move the black wire to +5V instead of ground? Windows 10 pro 64bit | Intel I7 4790K@ 4GHz | 24GB Crucial ballistix sport 1600MHz DDR3 | ASUS Strix GTX1080Ti OC | Crucial mx 100 250Gb SSD | Crucial mx 300 520Gb SSD "Game disc"| Samsung 1Tb HDD |
Recommended Posts