Software Debouncing An AnalogRead Voltage Divider Rotary Switch
i have single pole 9 position rotary switch 1k resistors between outputs, +5v first output, gnd last , com connected analog input of arduino mega. works expect giving unique ranges each position. however, expected, giving 1023 value in between slots. have used software debounce on momentary , 2 , 3 position switches, bit perplexed how go have switch on in same position until turn new position. delay not option me since attempting employ larger existing code many other switches. i have tried following existing switch debounce routines, i'm novice programmer @ best , brain getting fried. rather posting bad code, hoping tell me if should using same concept buttons or barking wrong tree. here's normal button debounce routine i'm trying work off , getting nowhere: code: [select] long lastdebouncetime[] = {0, 0, 0, 0, 0, 0, 0, 0, 0}; long debouncedelay = 10; boolean lastbuttonstate[] = {high, high, high, high, high, high...