Jump to content

Rotary switch as voltage divider problem


outbaxx

Recommended Posts

Hi guys

Has anyone used a rotary switch as voltage divider in dcs-bios?

I’m trying to but the selector switch moves very irregular. When I use a analogToSerial test code it work 100%.

In switches.h there are if lines were the first two has round(analogread) but the other doesn’t. Why isn’t it needed to round everything?

Anyway, I’m having problems using it and wondered if anyone used it with succes?

Link to comment
Share on other sites

Do you mean rotary switch or rotary potentiometer?

 

Cheers

 

Les

 

 

 

Hi

 

I mean rotary switch, but I’m putting resistors between the legs to make it a voltage divider and read the analog value.

Then instead of 6 pins on the Arduino I only need one. But I can’t get a good result, sometimes it switches the selector switch and sometimes it’s not, and the position does not correspond to the position on my switch totally random.

I don’t know how to see what value is actually read on the analog pin but if anyone know that would be nice.

 

Cheers

Link to comment
Share on other sites

 

 

 

Hi

I’m using 1k resistors between the legs and it work when I use a test code for anologRead. But when I use dcs-bios, I’m on .18 with the support for voltage dividers it does not, it’s not my own code.

I was thinking that there might be someone else using these and if so it would be very helpful to know where they used them so I could compare and try to find were I need to change something.

I’m trying to use the datapanelselector in the AJS37.

 

Cheers

Link to comment
Share on other sites

  • Recently Browsing   0 members

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