

Sting57
Members-
Posts
233 -
Joined
-
Last visited
-
Mike Force Team started following Sting57
-
Sting57 started following The Hornet Project , The Viper Project and Mapping a pot value
-
Ok just wanted to say thanks for the all help you guys provided. While it did not work I am very appreciative. With not having any luck with a software solution I decide to look at the hardware with a view to replacing the pots. Using the AnalogReadSerial code mentioned above i could see that neither pot was returning to zero. I am using a shared ground for the entire lighting panel, which as three pots and two toggle switches. During my testing i moved the ground wire on the arduino to another slot and boom, problem solved. Immediately after i moved the connection the pots returned to zero. So the issue is solved, for now. I have no idea if the issue will return cause when I reconnected to the original slot it worked as well. So hopefully it was just a bad connection.
-
Thanks Vinc, I do this for the backlighting out put. With my own backlighting I use the map() function to not output until the pot turns a certain distance. My issue is the other panels, like WinWing,throttle. Ohh that looks nice and simple, will try as soon as i get home. Thanks!
-
I believe they are all linear. Thanks, unfortunately i am not a coder so quite unsure what any of that means. I will keep playing around. Thanks
-
Hi all, I am using FP DCS Bios for my cockpit and needing a bit of help for mapping the pot values on my Console and instrument lighting pots The range on the pots is approximately 1500 to 65000 (according to BORT). This means that because the lower number is not zero, the backlighting is always on. I was hoping to use the map() function like this. void onConsolesDimmerChange(unsigned int newValue) { if (newValue < 1999) { ConsolesIntensitySwitch = map(newValue, 0, 1999, 0 , 0); //slower kick-in to match sim } else { ConsolesIntensitySwitch = map(newValue, 2000, 65535, 0 , 180); //output capped to lower max brightness } analogRead(A0); } DcsBios::IntegerBuffer consolesDimmerBuffer(0x7544, 0xffff, 0, onConsolesDimmerChange); This way DCS would not turn the lights on until my pot had passed 2000. However it is not working. The pot is connected to pit AO on a MEGA. I have used the map() function with AnalogWrite however never with AnalogRead (I'm not sure if it is the correction function to use. With the code, DCS does not read/see the value of the pot. This of course works DcsBios::Potentiometer consolesDimmer("CONSOLES_DIMMER", A0); Any thoughts?
-
Hi I used the code from the jssting site and it works fine. I did notice that the input from the encoder is not very precise though, ie one click on the rotary encoder may or may not generate the keystroke and sometimes it generates the opposite direction keystroke or both!. I mapped the encoder to the kneeboard next page and previous page keystrokes in DCS. Most of the time it goes to the next page if i turn it right, but sometimes it goes back to previous page. It is mostly workable but like I said, not particularly precise. Is this just how rotary encoders are? or is it the code, or is it my cheap aliexpress rotary encoders causing that issue? For my other encoder i use it to turn the nvgs on and the gain up and down, it works really well for that application cause it does not need to be that precise.
- 21 replies
-
- arduino
- rotary encoder
-
(and 2 more)
Tagged with:
-
Native support for MFD export (also in VR)
Sting57 replied to Bergison's topic in DCS Core Wish List
Add my vote to this one. -
no evidence being possible Possible to select a specific waypoint??
Sting57 replied to Nealius's topic in DCS: F/A-18C
Wow this would be a great feature to implement. -
Hi all just setting up the standby instruments for the new screen using Helios. Was able get them all working except the SAI. I have the ball rolling around correctly however I can not find were to map the waterline change and the ils bars etc. I have been using Helios to complete this. Is it possible to export a fully functioning SAI?
-
that is from TekCreation.
-
Nice little flight from the other night.
-
yep thats the one.