Mr_Burns Posted July 6, 2019 Posted July 6, 2019 Hi, Im trying to run a test on the APU panel for the F/A-18, can anyone see anything wrong with this: The red wire is to the LED, Black is Ground for all the switches, blue is the APU start and L/R Crank. I get the 'matrix' running (connect serial port) and have DCS running, My install is on another drive to this USER (dont know if thats an issue) Any ideas welcome please!
Bullant Posted July 6, 2019 Posted July 6, 2019 (edited) First thing that jumps out is that you have the switches defined as pins 14, 15 and 16 but have the wires connected to pins 11, 12 & 13. The second thing I'd do is grab a multi-meter and make sure that the switch changes from open-closed or closed-open circuit when you out the meter across the two pins that you have connected and flip the switch (I only say this because the switches both have dual pins and it is possible that you have connected both wires to the same side of the switch) Third: check that you added this line to your export.lua dofile(lfs.writedir()..[[scripts\DCS-BIOS\BIOS.lua]]) Install being on a different drive to the user saved games folder is not an issue (my saved games is on C: and install is on external drive F:) also well worth trying this to make sure that dcs-bios is talking to DCS correctly, before trying to get the arduino setup working. MoVoa-BUOkQ Edited July 6, 2019 by Bullant Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai, Kola, Afghanistan
Hansolo Posted July 6, 2019 Posted July 6, 2019 You have not connected your switches and LED to the pin numbers you have designated in the code. Connect the red wire for the LED to pin 13. Then rearrange the switches to e.g. 10-11-12. When using the analog pins for digital input you can just use designation A0-A5. A6-A7 on the Nano only works as analog inputs. Cheers Hans 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
Mr_Burns Posted July 6, 2019 Author Posted July 6, 2019 Hey hans I thought I had: is D10 not pin 13??
Bullant Posted July 6, 2019 Posted July 6, 2019 (edited) D10 is referred to as 10 in a sketch A1 is referred to as A1 in a sketch So you need to be referencing 10 for the LED, 11 for the APU switch and 12,13 for the crank switch based on how you are wired up. Edited July 6, 2019 by Bullant Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai, Kola, Afghanistan
Mr_Burns Posted July 6, 2019 Author Posted July 6, 2019 First thing that jumps out is that you have the switches defined as pins 14, 15 and 16 but have the wires connected to pins 11, 12 & 13. The second thing I'd do is grab a multi-meter and make sure that the switch changes from open-closed or closed-open circuit when you out the meter across the two pins that you have connected and flip the switch (I only say this because the switches both have dual pins and it is possible that you have connected both wires to the same side of the switch) Third: check that you added this line to your export.lua dofile(lfs.writedir()..[[scripts\DCS-BIOS\BIOS.lua]])Install being on a different drive to the user saved games folder is not an issue (my saved games is on C: and install is on external drive F:) also well worth trying this to make sure that dcs-bios is talking to DCS correctly, before trying to get the arduino setup working. MoVoa-BUOkQ I must have the wrong pin out? Man I picked the wrong month to stop drinking...
Bullant Posted July 6, 2019 Posted July 6, 2019 I must have the wrong pin out? Man I picked the wrong month to stop drinking... LOL As per my last post, ignore pin number and look at the labels. Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai, Kola, Afghanistan
Hansolo Posted July 6, 2019 Posted July 6, 2019 Try and use pin 13 as output only. If you really need pin 13 as input you may need to desolder the onboard LED. Otherwise it won't register the change. Cheers Hans 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
Mr_Burns Posted July 6, 2019 Author Posted July 6, 2019 LOL As per my last post, ignore pin number and look at the labels. Thanks mate, will give it a go tomorrow, just to top it off, the update wiped my key bindings for the Hotas, dry july lasted until about 16.20 after that!!
Mr_Burns Posted July 6, 2019 Author Posted July 6, 2019 also well worth trying this to make sure that dcs-bios is talking to DCS correctly, before trying to get the arduino setup working. I must be a fcukwit, it didnt work and I cannot seem to get ^ working?! I dont have Chrome (Mozilla) and I am slow, it appears!! When you say labels, is there a picture like that Nano above with pin descriptions for DCS Bios?
Bullant Posted July 6, 2019 Posted July 6, 2019 When you say labels, is there a picture like that Nano above with pin descriptions for DCS Bios? The labels are directly on the Nano. If you look at where you have the red wire plugged in it is labelled as D10, so you would use the following command for your LED DcsBios::LED apuReadyLt(0x74ba, 0x80000, 10) The important thing to remember is that if it is a digital port (Dxx) then you just refer to it as xx in your sketch For analog ports (Ax) refer to it as Ax in your sketch Intel i7 13700K @ 5.3 GHz / ASUS TUF Gaming Z490-Plus / 64 Gb G.Skill DDR4-3600 / RTX 4090 / 2TB Kingston KC3000 NVME / Win 10 x64 Pro / Pimax Crystal / WINWING F/A-18 HOTAS A-10C, AJS-37, AV-8B, F-4E, F-5E, F-14, F-15E, F-16, F/A-18C, F-86F, FC3, Christen Eagle 2, FW190D-9, Mosquito, P-47D, P-51D, Spitfire, AH-64D, KA-50, UH-1H Combined Arms, WWII Asset Pack, China Assets Pack, Super Carrier, Falklands Assets Nevada, Normandy, Persian Gulf, The Channel, Syria, Mariana Islands, South Atlantic, Sinai, Kola, Afghanistan
Hansolo Posted July 6, 2019 Posted July 6, 2019 also well worth trying this to make sure that dcs-bios is talking to DCS correctly, before trying to get the arduino setup working. Mr_Burns, the easiest way of determining if your connect-serial-port communications works, is to: 1. Load the sketch to your Arduino 2. Start connect-serial-port and use the same COM port number as you used for loading sketch unto the Arduino. 3. Flip a toggle switch and you should get the text lines showing up in the connect-serial-port window. Similar to this; You don't need DCS to check this part out as the Arduino is sending the signals back to the PC via connect-serial-port. Cheers Hans 132nd Virtual Wing homepage & 132nd Virtual Wing YouTube channel My DCS-BIOS sketches & Cockpit Album
Mr_Burns Posted July 14, 2019 Author Posted July 14, 2019 Hey guys just wanted to say a big thank you to Hansolo and AndrewW who helped me out a lot. I realised a couple of things, magnetically held switches act a little different so if like me you were having trouble with the 3 position L/R Engine crank, try the flaps switch first! Also, I changed the processor type in the Arduino IDE to 328P (Old Bootloader) for my Nano. Finally and what I never forget is what a great community this is, thank you. Now I have spent the weekend trying to curve the fuselage without sucess so Im off to Bunnings (Home Depot/B&Q Australian Equivalent) to source some flexible panels. I tried using Masonite 1200 x 900mm 3.2mm and even cut grooves on it to try and flex but it was too much curve, if you are starting out and reading this, dont just draw curves you think will look OK, follow someone else's sucess! Im thinking using strips of Masonite to create a stepped curve then fiberglass it and sand it smooth.
Recommended Posts