frogger Posted March 23, 2018 Posted March 23, 2018 hi im slowly learning the ardunio and dcs bios. i have gotten to a point where i can wire up a bunch of stuff and have it work. but now i have all 13 pins wired up in my uno im having issues with switches throwing the wrong command. i have used a single wire that joins to all the ground pins of the toggle switches and im wondering if i need to do anything else to protect it or should it work fine.
draken152 Posted March 23, 2018 Posted March 23, 2018 Based on my experience you shouldn't have a problem due this. I have several rotary switches where I am using one ground cable for 4-5 switches and I didn't have this problem... [sIGPIC][/sIGPIC] Building FW190D pit ,,To Dora with love" http://forums.eagle.ru/showthread.php?t=132743
frogger Posted March 24, 2018 Author Posted March 24, 2018 i found i actual assigned pin 1 to 2 functions and i think i have a short somewhere as now i have a button constantly pressing on and off
yoreh Posted March 24, 2018 Posted March 24, 2018 Try to avoid usong pin 1 and 2. I think they mess up things as they are used to communication
frogger Posted March 24, 2018 Author Posted March 24, 2018 yeah pin 0 and 1 seem to cause issues. ill just have to buy some more arduinos to use more switches. thanks
Hansolo Posted March 24, 2018 Posted March 24, 2018 IMHO yoreh is on to the problem. Pins 0 and 1 are used for USB communication so don't use them. If you run out of digital pins use one of the analog ones. Instead of writting e.g. 5 in the pin assignment just write eg. A0. For a Nano you can do this with A0-A5. A6-A7 only works as analog pins. You may also run into issues with using pin 13 as digital input due to the onboard LED but it can be de-soldered Cheers 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
frogger Posted March 25, 2018 Author Posted March 25, 2018 thanks hansolo , i had used a few analog pins for pots but decided to disconnect them as it was only to control the cockpit lighting of the mirage i didnt know you could hook up a switch to them. im using a chinese uno and i have a nano in the mail. also thanks yoreh.
Hansolo Posted March 25, 2018 Posted March 25, 2018 @frogger, you can do the same with the Uno's and Mega's. You just need to check the pinout before using an analog pin as digital one Nano pinout; Here you can see that A6 & A7 is exclusively analog pins. Uno pinout, Here there is no notification that some of the pins are exclusively analog. And the Mega; Appears to be no notification that some of the pins are exclusively analog. In fact I am working on a project where I use almost all the analog pins on a Mega for digital inputs. The only issue I found was that I could not use the pin designation as A1-A14 but had to designate them as 55-68. Cheers Solo 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
frogger Posted March 26, 2018 Author Posted March 26, 2018 thanks hans very helpful diagrams. do i need to change the bios code for a push button rather then a toggle switch. ive found for eg the m2000 engine start button and throttle idle/cutoff buttons press twice. once for on and once for release.
Hansolo Posted March 26, 2018 Posted March 26, 2018 thanks hans very helpful diagrams. do i need to change the bios code for a push button rather then a toggle switch. ive found for eg the m2000 engine start button and throttle idle/cutoff buttons press twice. once for on and once for release. I don't know how to change the DCS-BIOS code to facilitate the M2000. I am just using the already available 'DCS-BIOS control references' for the A-10C. So have no idea how to set up a new module, i.e. the M2000, but Ian has made some instructions for this; http://dcs-bios.a10c.de/docs/v0.7.0/developerguide.html Cheers 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
Recommended Posts