outbaxx Posted June 29, 2019 Posted June 29, 2019 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?
lesthegrngo Posted June 30, 2019 Posted June 30, 2019 Do you mean rotary switch or rotary potentiometer? Cheers Les
outbaxx Posted June 30, 2019 Author Posted June 30, 2019 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
Sokol1_br Posted June 30, 2019 Posted June 30, 2019 Resistor value, maybe? BTW: https://learn.sparkfun.com/tutorials/rotary-switch-potentiometer-hookup-guide/all http://i.imgur.com/DJNt6.jpg https://simvim.com/tech_rotary.html
outbaxx Posted June 30, 2019 Author Posted June 30, 2019 Resistor value, maybe? BTW: https://learn.sparkfun.com/tutorials/rotary-switch-potentiometer-hookup-guide/all http://i.imgur.com/DJNt6.jpg https://simvim.com/tech_rotary.html 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
Recommended Posts