Bryan Mayland
TVWBB Hall of Fame
Well golly! So that sort of is making sense now. The easy thing to do, which I have in my build, is to pulldown the button analog pin even when no buttons are connected like so:
So you connect the 1k resistor to ground and the analog pin on your heatermeter board (in yellow), and then you have your 2 pin "button connector" header that has +5V and connects to the R5 junction where the blue line is. That way, when the button board isn't connected, the input is pulled down and returns BUTTON_NONE all the time. Then you can run with or without buttons connected because the input never floats.
So you connect the 1k resistor to ground and the analog pin on your heatermeter board (in yellow), and then you have your 2 pin "button connector" header that has +5V and connects to the R5 junction where the blue line is. That way, when the button board isn't connected, the input is pulled down and returns BUTTON_NONE all the time. Then you can run with or without buttons connected because the input never floats.