Steve2381
Senior Member
Hey all
I have an 8x key keypad that is connected to a 40x2. Because I don't have enough pins, its been set up with button 1 as a short to 5v, and then varying resistances over the other 7 buttons to give me a reading on an ADC input (0-1024).
I worked out the values, set a slight 'window' either side of the target value and all was well.
However, I switched it on tonight and its all gone sideways, none of the readings are correct. Could the temperature of my workshop affect the resistances that much?
It was snowing when I did the programming over the weekend (and very cold in the garage), but the only difference I can think of is that its warmed up now.
I have written a short 'calibration' routine to store the returned button values in EEPROM, but I don't want to constantly re-calibrate as the weather changes.
If it is that, maybe I could add a reference resistor? I am surprised its drifted that much (if that is what it is).
Don't have the code to hand, so can't post it.... but its not a code problem anyway.
I have an 8x key keypad that is connected to a 40x2. Because I don't have enough pins, its been set up with button 1 as a short to 5v, and then varying resistances over the other 7 buttons to give me a reading on an ADC input (0-1024).
I worked out the values, set a slight 'window' either side of the target value and all was well.
However, I switched it on tonight and its all gone sideways, none of the readings are correct. Could the temperature of my workshop affect the resistances that much?
It was snowing when I did the programming over the weekend (and very cold in the garage), but the only difference I can think of is that its warmed up now.
I have written a short 'calibration' routine to store the returned button values in EEPROM, but I don't want to constantly re-calibrate as the weather changes.
If it is that, maybe I could add a reference resistor? I am surprised its drifted that much (if that is what it is).
Don't have the code to hand, so can't post it.... but its not a code problem anyway.