Jump to content

arduino and potentiometer.


BULLITT83

Recommended Posts

which potentiometer did you use on your arduino . actully i try 10 Ko potentiometer to simulate my tacan course selection and it is " too fast " .... how do "slow down" the pointer ?

 

same with rotary encoder , how to tune the sensivity of this switch , i made almost 180° at each step ? ...

 

please help

Link to comment
Share on other sites

Potentiometers are only suitable for controlling things like volume or brightness types of controls. But 10k is a good selection for a pot. For items like channel selectors, course and heading knobs(HSI), altimeter pressure and even volume controls, I use a rotary encoder.

 

To control how large a step the rotary encoder makes is done by adjusting the code as follows:

 

This is the basic rotary encoder code from the control reference docs for course knob on the HSI:

 

DcsBios::RotaryEncoder hsiCrsKnob("HSI_CRS_KNOB", "-3200", "+3200", PIN_A, PIN_B);

 

To adjust the size of the step, you change the -3200 and the +3200 to, lets say -1000 and +1000, or -2000 and +2000. Experiment with these setting and see what works best for whatever you are wanting to control.

Regards

John W

aka WarHog.

 

My Cockpit Build Pictures...



John Wall

 

My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing

 

 

WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram,



AIO Water Cooler, M.2 512GB NVMe,

500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display

VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals

Link to comment
Share on other sites

Warhog, thanks a lot for your answer ,

 

i'll try this .

 

may i ve anothger question : i build a sweep wing lever with a 10Ko Pot . but mechanicaly i can "move " the lever only on 90° ... so i don't have the full movement of the in game lever .... it works with my pot outside of my pit with his normal 270° movment.

 

How to have full in game lever travel with only 90° of real potentiometer movement ? increase or decrease potentiometer value may be a solution ? isn't it ?

 

regards

 

guillaume

Link to comment
Share on other sites

You should post your full code otherwise its hard to tell what may be causing this. Also, this may be better served by using a rotary encoder. Regardless, lets see your code and maybe we can fix this.

Regards

John W

aka WarHog.

 

My Cockpit Build Pictures...



John Wall

 

My Arduino Sketches ... https://drive.google.com/drive/folders/1-Dc0Wd9C5l3uY-cPj1iQD3iAEHY6EuHg?usp=sharing

 

 

WIN 10 Pro, i8-8700k @ 5.0ghz, ASUS Maximus x Code, 16GB Corsair Dominator Platinum Ram,



AIO Water Cooler, M.2 512GB NVMe,

500gb SSD, EVGA GTX 1080 ti (11gb), Sony 65” 4K Display

VPC MongoosT-50, TM Warthog Throttle, TRK IR 5.0, Slaw Viper Pedals

Link to comment
Share on other sites

Hi, I've added extra functionality to the Potentiometer function, it'll help you here. I can give you my header file if you like?

 

First ...i was happy of my simpit since i click on your FLICKR link ... amazing job is your sim pit !!!

 

next here is my code , very basic

 

DcsBios::Potentiometer pltEmergWingSweepltLever("PLT_EMERG_WING_SWEEPLT_LEVER", A0);

Link to comment
Share on other sites

That's great to hear, glad it worked out! There's polling function in there too, so if you want the current position sent to the sim on startup take a look at my other thread, or I can help you here.

 

cheers

 

John

 

 

Blue it works perfectly with your code !!!! thats great ! i managed to tune my axis perfectly ! without changing potentiometer value !

great

 

THANKS A LOT

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...