wct24 Posted July 25, 2024 Posted July 25, 2024 (edited) i made a simple board with buttons, its the aux pannel of the f16. I connected a potentiometer to the arduino and used the BORTcoding. it works very good? Problem is when i put and rotaryswitch(made like a hornets nest) and connect it to the arduino suddenly 3 or 4 switches starting to turn and go on and of in dcs as i turn the pot. Can anyone help me. I put the pot for the hmcs on A0, the rotaryswitch for cmds prog on A2, the rotaryswitch for cmds mode on A4, connected the +of the pot and rotarys on 5 V and the - on the ground, near the 5v . Am i doing something wrong? Tryed to solve it but i got stuck. Johan Edited July 25, 2024 by wct24
jmossr Posted July 25, 2024 Posted July 25, 2024 I don't know if what you call a rotary switch is actually a rotary encoder. If so, you need special code for that. It is completely different from reading a potentiometer. Look here for info about reading a rotary encoder https://arduinogetstarted.com/tutorials/arduino-rotary-encoder
wct24 Posted July 25, 2024 Author Posted July 25, 2024 This is the link its a multi position switch the code i use is the code from DCS-Skunkworks/Bort. i supposed it was complete becaus the other codes work perfect
jmossr Posted July 25, 2024 Posted July 25, 2024 Sorry, I have no experience with this kind of switch. I hope someone else can help you. If not, in a few weeks I can have a look at the specs and dive into the Bort code to see if I can find something.
No1sonuk Posted July 25, 2024 Posted July 25, 2024 Please post the code you're trying. A video of what it's doing would be helpful too, or just a more detailed description than "suddenly 3 or 4 switches starting to turn and go on and of in dcs as i turn the pot". 2 hours ago, jmossr said: Sorry, I have no experience with this kind of switch. I hope someone else can help you. They're basically a rotary switch with some components to make them behave like a low-resolution potentiometer.
jmossr Posted July 26, 2024 Posted July 26, 2024 4 hours ago, No1sonuk said: They're basically a rotary switch with some components to make them behave like a low-resolution potentiometer. Nice. Thanks!
wct24 Posted July 26, 2024 Author Posted July 26, 2024 18 hours ago, No1sonuk said: Please post the code you're trying. A video of what it's doing would be helpful too, or just a more detailed description than "suddenly 3 or 4 switches starting to turn and go on and of in dcs as i turn the pot". They're basically a rotary switch with some components to make them behave like a low-resolution potentiometer. i m on vacation now, but when i come back home i'll try to post a video and the code thanks already for the reply
Recommended Posts