-
Posts
310 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Everything posted by Sickdog
-
Hi everyone, I’ve searched far and wide on the internet and everywhere in this forums for my problem and I’m hoping I’m doing something obviously wrong since I haven’t seen any discussion close to my problem. And I’m banging my head against the wall trying everything, I have too much patience. I’m trying to use LuaExport in a mission script to get DCS to communicate with a Discord BOT (I’m recreating something I’ve seen out there so I know it’s possible and I’ve tried using the code already available for it on Github so I’m not reinventing the wheel) but I’m throwing an error early in the scripting LUA file that the mission loads. I’m getting the error: attempt to call global “require” (a nil value) when it reads the line: socket = require(“socket”). And yes, I’m including the path for the LuaExport directory prior to the require line, I’m using the example code export.lua file (which is the same as the code from github). It’s as if DCS doesn’t understand the function “require”, I’ve tried so many variations with trial and error it keeps giving me that error. Can anyone with a stronger knowledge of lua explain to me what it means to get this error with DCS? Does something have to be modified/loaded to get DCS to use the require function? Or maybe require is working properly and it’s some other reason that socket is coming back nil. Thanks in advance! Edit- gotta love how I spend a week working on this, banging my head against a wall, finally post, and an hour later figure it out. For any dummies like me out there that run into this, perhaps this will help you as I found nothing in my searches that led to this. But the issue was related to missionscripting.lua. I knew of this file being edited for outputting info (alexra LSO mod for example- if you wanted to export LSO grades) but didn’t realize I needed to do something with this. I actually don’t know what actually did it because I did a few things. 1) I added require “socket” and require “strings”, and 2) I commented out the LIB=nil line. Think it was the LIB = nil that did it but who knows. Or Mods, feel free to delete this post if you find it appropriate to do so. Thanks.
-
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
Hey guys- I’m back with a question. It’s been awhile but my gear lever has been functioning great this whole time. However, my Cougar MFD that was in close proximity to the gear lever stopped working one day, just totally dead. Just a guess but thinking there’s a strong magnetic field when I power that sucker up, or something that fried the cougar. Anyway, I stopped powering the solenoid for awhile till I could remount the lever farther from electronics (but also for proper placement for my sim-pit). So now that the gear lever is remounted where I want it, I tried plugging it in with my 24VDC and a weird thing is happening. Only when in the hornet pit and no other time, the solenoid cycles on and off over and over again. It’s been awhile since I wired it up so my trouble shooting skills are a bit rusty right now. But I confirmed the wires are all correct (gear lever functionality up/down is fine) and the DCS BIOS sketch hasn’t changed. Any ideas? Thanks!! -
I just ran into same problem as I'm building my F-18 RWR control panel and decided to do a forum search for help. Have you (or anyone) found a solution to this? In the meantime what I have done to make it more usable is added ",true" after the pin number to reverse the input of the button, so in a sense it's always on and can't turn the RWR off. I figured that once you turn on the RWR who cares if you can't turn it back off! At least for the time being, would love for this to be addresses. Wondering if it's something we can get into the LUA and play around with and maybe fix ourselves? I'm not terribly savvy with DCS-BIOS library customizations, but willing to learn. --EDIT-- So I think I've found where this problem originated... I just noticed the "DISPLAY" button (immediately to the left of the "ON" button) behaves the way the "ON" button should be behaving. So the "DISPLAY" button latches in the pushed and held position where as the "ON" button behaves as a momentary pushed on button. These two need to be reversed. Anyone know how to do that? I'll start looking at the LUA and report back if I figure it out. —-EDIT NUMERO DOS —- Ok, I might just be a pit builder noob but maybe the problem here isn’t with DCS-BIOS and it’s with buttons. I noticed as I’m working on a Station Select for Jettison that I’m getting the same behavior... a momentary press when it should be latched. Hmm, maybe I shouldn’t be using momentary push buttons and need to use a physical locking/latching push button!? I’m hoping that’s my issue because i just ordered some from amazon. Can anybody confirm if my logic is improving here? And to my second edit- I can’t confirm that the Display butting is behaving incorrectly, please disregard.
-
Hi gang, So I’ve run a search of the forums and have seen 1 or 2 threads addressing this issue, but they’re pretty old now and I’d really like to know if there’s a solution to this. Problem: while the push/pull inputs work fine, the turn input seems to only work when setting the parking brake. Once the brake lever is pulled out (parking brake on), I can’t seem to turn the handle to allow the release of the brake lever with DCS-BIOS inputs (I even tried the virtual cockpit). I can get it working fine by using LMB and RMB, so i see how it’s supposed to work. But I’d like to get it working for my desk-pit parking brake handle. Does anyone know if this is a DCS-BIOS LUA issue, a DCS module limitation, some other DCS-BIOS limitation, or can anyone with more knowledge of DCS-BIOS confirm whether this can be fixed or not? (Extra info, which may not be relevant to the problem: I have a simple push/pull parking brake switch, i don’t plan to go through the trouble of implementing the physical rotation of my handle. My plan is when i pull the physical lever it will send the DCS-BIOS message to first rotate and then pull the handle. Despite not having the emergency brake functionality, at least I’ll keep my design simple and be able to activate the parking brake, which its functionality is used far more than the emergency brake. Or maybe I’ll add a simple small button under the physical lever that sends the rotate command, if we ever get it working) Thanks guys!
-
Haha, well, by saying I’m “cheating” I’m using it tongue in cheek in the sense that I feel like I’m cheating using a software solution when it would be cooler and more realistic to use a hardware solution, such as the one you referenced in the link/video. And yes, fully aware of the purpose of the safety switch as I’m a corporate pilot in real life with a few of these safety switches in the cockpit of the plane i fly. Thanks again for the help!
-
Haha- I’ve definitely had that same thought when I fly the Puk’n Dogs livery in the tomcat, so no apologies! Thanks for the reply. I definitely like the solution you referenced in the video... I might try that if I decide the coding method feels like I’m cheating or want more realism.
-
Thanks Ranma- I like your idea of just sending one action after another. I might try that first and see how I like it, but I’m sure at some point for the sake of realism (that’s what this is all about, right guys? Haha) I might try other solutions that detect the cover being lifted. Sorry to ask here but can you (or anyone) direct me to a good source to learn from or examples of this code? I’m relatively new to arduino coding (tho I have some general coding experience) and not sure how to send one action after another. I’m guessing it’s some lines of code in the “loop” section that has an IF statement? Thanks for any assistance on this!!
-
Hans, Thank you for both your suggestions. I read that link and definitely a great hardware solution to this dilemma. I think I’ll first try to see if I can figure out how to send a delay and code this solution, hopefully there’s some good discussions out there or arduino tutorials on how to do it! I’ll post back here if and when I find a coding solution to this. I’d rather not have to dismantle my panels I just finished and replace with new switches! Haha.
-
Hi guys, I have some guarded switches I want to use with my Hornet DCS-BIOS desk-VR-pit and just noticed that DCS-BIOS has its own commands to lift the guard, separate from the actual switch toggling. I have some simple guarded ON/OFF SP switches I purchased from Amazon: https://www.amazon.com/dp/B07QKFD7Z7/ The question I have is does anyone have any good solutions to bypass the need to have an input for the lifting of the guard itself? I feel it’s sort of redundant and wish I could have the physical switch toggle/input both lift the guard and flip the switch in game. I tried to give both commands to the same pin in my arduino sketch but that didn’t work. Would a programmed delay (if possible) work? I thought about trying to install a push button that is activated by the guard but that seems too complicated and won’t look good. Appreciate any input here! Thanks!
-
Are you saying you used to get something other than weird symbols in the Arduino serial monitor? I’ve only been using arduino and DCS-BIOS for the past 3 months but have never seen anything other than weird symbols in the serial monitor. However, in the previous (non-web based version) of DCS-BIOS when you ran the command line to connect the Arduino to a serial port you would see the correct input listed when you manipulated the switch, button, rotary encoder, etc. Now with the web-based version life is easier but I miss seeing the command line window where I can test the switch. Now I’m just happy when I see symbols in the serial monitor to confirm a signal is being sent but I go in game to test my inputs. To me what you’ve described seems normal with the serial monitor since day 1 for me. The bigger question I have is does your arduino setup work in game?
-
Gotta bump this thread, I was about to mention the same thing. It’s been bothering me for a long time... I’m also a RL pilot for a profession, I know what taxi/landing lights look during the day and night and seeing it light up the ground in bright-blue-sky daylight is quite unrealistic. Any chance this gets worked on, ED?
-
Wonder if the Hornet pilot animations will be updated to be similar to Heatblur’s Fantastic F-14 pilot salute? It’s gonna be so disrespectful if Hornet drivers can’t be seen saluting like the Tomcat drivers, they’re gonna get a bad reputation (and the shooters and hornet pilots will have to use ESP to know when they’re ready to launch!!)
-
My question is this: what will the ED solution be for the fact we will be using a PTT button for both AI comms (talking to wingman, ATC,Tanker, etc) and PTT button for VoIP/multiplayer communication? I’m relativity new to SRS and think it’s incredible, but haven’t found a great solution for the fact that I basically need two PPT buttons per radio, which is annoying when you’re already limited to joystick buttons. My current solution is using a modifier for AI comms PTT (since I use it less than the VoIP PTT) with my warthog, but wish there was a better way. It’s a bit annoying using the same PTT for each comm purpose, anyone that uses SRS knows what I mean, I think! Or if someone has a better way please share!
-
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
That’s helpful to at least know that, thanks for the reply Hans. I might try the 12VDC again now that she’s been humming along with 24VDC, maybe she’ll magically be happy with less voltage now. Either that or I’ll buy a Halon fire extinguisher and rig it up to a T-Handle to pull for a gear lever fire, kinda like for an engine fire, adding a mixed reality to emergencies in DCS! ;) But in all seriousness, thanks again. -
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
Question for any of you (or perhaps just DeadMeat) that is powering a solenoid in a gear lever.... So I’m noticing that with the 24V power I have connected to it, the unit gets really hot after maybe an hour our two of use. It heats up in one little area on the side of the unit, perhaps where the solenoid is. It’s so hot that I can barely touch it. It’s relatively exposed so I don’t think it’s a ventilation issue. Does this sound normal? -
DCS-BIOS Dynamic Mapping based on Aircraft Type Code
Sickdog replied to Blue73's topic in Home Cockpits
Does anyone know if at any point it would be possible to output controls using this dynamic mapping method? I’m building a desk pit based on an F-18, have a gear lever wired up using DCS-BIOS, and using the gear solenoid with detection of Weight on Wheels. I’ve got this dynamic mapping working for the gear handle operation for the F-18, F-14, F-16, F-5, and M2000 but I’d also like to use the WOW (IntegerBuffer) code so it works with different modules without having to re-upload aircraft specific sketches. Thanks in advance for your help! **EDIT** Ok, so shortly after writing this I think I came up with a solution... I'm still new to DCS-BIOS so didn't realize I could just rename the WOW functions in the aircraft LUA file under DCS.openbeta\Scripts\DCS-BIOS\lib. I appended "VIPER" and "HORNET" to the code to differentiate the WOW functions for both the F-16 and F-18 and tested it out and works fine. I guess it's not ideal but instead of using the code by Blue in my sketch I'm just adding all the functions for each aircraft. So far it's working fine for the gear lever, gear unsafe LED, and the WOW/solenoid output signal for multiple aircraft, so hoping my luck continues for other switches/panels that I plan to build! -
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
So here’s one of my last updates... good news! I got a batch of new Mosfets (Cylewet, as I mentioned above), and now it works perfectly! I have a feeling I fried the first mosfet at some point, or maybe because I initially forgot to place the 10k resistor. Anyway, thanks again for the heaps of help and sharing your wealth of knowledge DeadMeat! I’ll share a video and some photos soon of my setup. Now I’m considering grabbing another gear lever to make a hook like yours too! You’re costing me a lot of money with your ideas DM! Haha! -
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
Thanks DM, I really appreciate your sticking with me on this, despite my obvious lack of electrical knowledge! So I tried what you suggested regarding pulling the signal wire from the Arduino and sure enough, it stays energized. I've even switched from the Lafvin Nano back to my original Elegoo Uno and bread board with new wires to isolate some variables and same results. Interestingly enough, the only way power is cut to the solenoid is if I pull the negative lead from the power supply to the breadboard. If I pull any of the other common ground wires, the solenoid stays energized. I've also switched between different power supply female connections and disassembled/reassembled the wiring multiple times with no change in results, so I think I'm left with one possibility... either a faulty or improperly wired mosfet. I've got some new ones on order (different brand but still Logic Level: Cylewet 6Pcs RFP30N06LE Logic Level N-Channel Power Mosfet TO-220 Power Control DIY Kit for Arduino (pack of 6)CYT1069) from Amazon. I'm wondering if I just fried this current Mosfet somehow and it's shorting out, seemed like it was working fine in the beginning, minus the lack of voltage from my 12V for the solenoid. Stay tuned for more updates, I think I'm getting close to success (or failure)! In the mean time, just got my first 3D printer setup, so looking forward to building some parts to go along with this new gear handle. I've officially begun spiraling down the Rabbit Hole! -
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
Another Update: Ok, so I soldered the 10K resistor onto the Mosfet, and I've cleaned up the wiring a little by making sure everything is either soldered together or securely pinned in place on gear lever and the Lafvin Nano. No more smoking or overheating of anything when all plugged in (maybe I had a brief short when I smelled the burning, I had a lot of wires all over the place)... so that's good. But here's the latest strange behavior: With everything plugged in, DCS-BIOS CMD running, and in game initially, the downlock is functioning properly. As soon as I go weight off wheels, the solenoid energizes and I can retract the gear. Great! But then when I land/crash/restart, the solenoid isn't de-energizing and therefore I can continue to raise the physical lever while virtually on the ground in the F-18. What's weird is I know at one point during this project I could hear the solenoid de-energize when I crashed/landed/escaped out of the pit. I'm not sure what's going on now. Here's my code in the sketch and some photos that might show what my setup looks like for better understanding. #define DCSBIOS_DEFAULT_SERIAL #include "DcsBios.h" byte NoseWow = 0; //weight on wheels - check if variable needs to match unsigned int byte RightWow = 0; byte LeftWow = 0; /* paste code snippets from the reference documentation here */ //---Check for WoW void onExtWowNoseChange(unsigned int newValue) { if (newValue == 1){ NoseWow = 1; } else { NoseWow = 0; } } DcsBios::IntegerBuffer extWowNoseBuffer(0x74cc, 0x0200, 9, onExtWowNoseChange); void onExtWowRightChange(unsigned int newValue) { if (newValue == 1){ RightWow = 1; } else { RightWow = 0; } } DcsBios::IntegerBuffer extWowRightBuffer(0x74cc, 0x0400, 10, onExtWowRightChange); void onExtWowLeftChange(unsigned int newValue) { if (newValue == 1){ LeftWow = 1; } else { LeftWow = 0; } } DcsBios::IntegerBuffer extWowLeftBuffer(0x74cc, 0x0800, 11, onExtWowLeftChange); DcsBios::LED landingGearHandleLt(0x7478, 0x0800, 4); const byte gearLeverPins[2] = {2, 3}; DcsBios::SwitchMultiPos gearLever("GEAR_LEVER", gearLeverPins, 2); void setup() { DcsBios::setup(); pinMode(5, OUTPUT); //Output for solenoid control } void loop() { DcsBios::loop(); if (NoseWow == 0 && RightWow == 0 && LeftWow == 0){ //all wheels off the ground digitalWrite(5, HIGH); //activate solenoid to retract downlock } else { digitalWrite(5, LOW); } } -
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
Ok. Getting tired of me yet? :) I'm about ready to just give up as the solenoid down lock certainly isn't a deal breaker if I can't get it to work, I'm just happy to have the functioning gear lever with LED's lit up with DCS. But... I'd absolutely love to get the solenoid working properly. So here's the deal.... I got the 24V adapter from Amazon that you linked for me, and sure enough plugging straight away into the cannon plugs energized the solenoid and released the gear down lock with no problem (as opposed to the wimpy 12V that needed some mechanical help). Great. So, next I hooked it all up... the gear lever, power supply, and SparkFun MOSFET Power Control Kit to my Lafvin Nano running DCS-BIOS. I used the Sparkfun wire diagram as a reference, which shows a common ground for the power supply and the Arduino board. Aside from some issues with the MOSFET (seems like I have to wiggle the wires on the power side a little to make it work, despite what appears a pretty good soldering job I did putting it together, not sure what the deal is there), once I had wiggled the wires just right it was working great in DCS with WOW switching and everything. But... maybe 20 minutes in or so I began to smell faint burning.... UH-OH. I unplugged everything right away, nothing was melted or burnt but the Lafvin Nano card was scorching hot. Yikes. The card still works but I figured I better come to the experts before I try plugin in that 24V again. I'm guessing I'm an idiot for assuming the Nano can have a common ground with the 24V power supply, does that sound like an issue? Any ideas on how I can hook this 24V up without burning down my house? :) Thanks again for your time and patience dealing with a complete electrical putz here, I may not know much about it but I feel like I'm learning a lot and really enjoying this project. *** EDIT- I just noticed that I somehow overlooked the 10K resistor that came with the Sparkfun Mosfet kit, I still need to solder that onto the mosfet. Could that possibly be related to my problems? *** -
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
Great! Once again, thanks so much for your help DM! I’ll try that one and report back in a couple days when it arrives. -
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
Thanks so much for the info guys. I’m really not educated in electrical systems other than generators and busses for the plane I fly, so my apologies for dumb questions. But would the power supply you linked from SparkFun that’s 12v 600mA possibly make a difference or should i just go straight for a 24v supply? (Edit- would something like this work? http://www.amazon.com/dp/B01EG137I0/ref=cm_sw_r_cp_api_i_oR4JDbQB39JV0 Thanks again! -
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
After a little hiatus from my project I'm back at it and good news to report- I went through a lot of struggling (and many times I almost begged for help here), but I figured out with your great help from earlier DeadMeat. One of the issues I had was a problem loading the Control-Reference.html in Microsoft Edge after editing the F-18 LUA file, until I figured out I need to load it in Google Chrome (or maybe anything other than Edge) to work. Then I finally saw the addresses for the WOW functions in the control refference, plopped them into my sketch and passed that hurdle. The next issue (for anyone getting help reading this) was I didn't ground the Mosfet power switcher to the Arduino board... so I was getting intermittent issue with the WOW function powering the downlock solenoid. Once I got that wired properly, it worked pretty well with one exception. I'm not sure if it's an issue witht the actual solenoid/gear lever or maybe I'm still doing something wrong, but the first time it tries to energize the solenoid with the aircraft airborne (weight off wheels) the solenoid seems to energize partially (yet I don't hear it) but the downlock is still engaged and I can't retract the gear. If I push down maybe 1/4 the way of the mechanical downlock overide button, I can hear a little buzzing and then the click, and then the solenoid/downlock mechanism works fine for the rest of the flight without pushing down anymore on the override button. The solenoid de-energizes properly when I land/crash/reset the mission and then I have to repeat that partial button press process each time I go weight off wheels again. Kinda annoying, and to defeat it, I have taped down the button partially just enough so the downlock still locks and the gear can still be retracted weight off wheels without me pressing it. Would love to figure out what the problem is but I can live with this. (Edit - forgot to mention that when I plug the 12V wall wart power supply directly into PINs C and D of the cannon plug, the solenoid powers but I have the same issue where I need to press the mechanical down lock override a little (maybe 1/2 way) to get it to unlock, and then the gear can be retracted and extended over and over fine without having to press the down lock override at all, until I unplug the wall wart power, at which point I have to repeat that process just mentioned... so I think it's an issue with the gear assembly/down lock/solenoid itself, and not the code/Arduino/mosfet) (Edit 2 - this tape solution isn't working that well. Now I'm wondering if perhaps I'm not getting enough voltage or amperage to the solenoid, is that possible? I got a power adapter purchased off of Amazon.com that outputs 12V and 500mA. Could that be the problem?) Thanks again for all your help DM, and I'll post a video when I'm all done mounting it. On that note, I've been using wires with female ends connected to the back of the cannon plug connections... seems to work fine, no need to solder anything. Any issues with that or is it better to solder to the pins? -
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
Just a quick note- I tried the gear handle out, and with your invaluable help DeadMeat, it worked on my first attempt! I wired it up EXACTLY the way you told me to, and the part I would never have figured out on my own is the "Advanced" mode of DCS-BIOS and the two pin line of code, so THANK YOU! Even the gear lights are lighting up great without having to do anything other than wire up PIN B and adding the line of code for the gear light. Unreal. I absolutely love this! Now I'm just waiting for my parts to come in from Amazon to wire up and power the Solenoid, hopefully that's as straight forward as the rest so far. I can't wait to mount this baby to my Monstertech and start slapping the gear up and down... Now I want to do the hook lever like you did too. One thing at a time. -
Table mounted landing gear selector switch from a Tornado
Sickdog replied to DeadMeat's topic in Home Cockpits
DeadMeat, I owe you a beer if you're ever in Los Angeles! THANK YOU! So I've already been experimenting with DCS BIOS, got up and running super fast and have a template (printed out panel taped to cardboard) with Landing Light, Hook Bypass, Launch Bar, and Anti-Skid on/off toggle switches working great with an Elegoo R3 Aurdino (starter kit I bought from Amazon for about $39 USD) and a temporary landing gear lever using an analog joystick (from starter kit). I even went crazy at the hardware store, just playing with ideas to test out, and purchased a $0.99 USD light switch and attached a small metal tube to it to temporarily try out an arrestor hook. I couldn't believe it all worked the first time with DCS-BIOS, unreal how easy this is for someone without much experience like myself. So long story short, I've been getting very familiar with Aurdino/DCS-Bios while awaiting the gear lever, so I feel ready to tackle this. The info you gave in this last post is the missing link on wiring it up and getting the solenoid to work, so I can't thank you enough! I'm on a work trip tomorrow and in a hotel for a couple days, I might bring some of this with me to play with in the hotel room... so stay tuned!