Removed the external 100k resistor and tried using the internal pullup resistor again.
Works.
void setup() {
Serial.begin (115200);
analogReadResolution(16);
}
void loop () {
pinMode(A0,INPUT_PULLUP);
delay(0.4);
int c = analogRead(A0);
Serial.print(c);
Serial.print("\n");
pinMode(A0,OUTPUT);
digitalWrite(A0,LOW);
delay(20);
}
A single press captured in all it's glory
60424 59284 59347 56480 52928 52245 50397 45113 41819 38814 35965 33451 31761 31011 30624 29825 29207 29131
So I can go back to zero external components required, probably.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.