Ok so if I don't call the ADC constructor in the loop, then the anomalous behaviour goes away. However the problem then is that I need to dynamically reconfigure the pins to read the touchscreen and I'm not entirely sure what the behaviour of calling ADC(pin) and retaining a reference and then reconfiguring the pin and resetting it, would do. It's possible that the ADC still works correctly after doing this which might mitigate the issues I'm seeing, I'm not sure yet. On the 2040, this doesn't cause any anomalies but it looks like the pin will change voltage if it's at a certain input voltage when you call the ADC constructor.
Statistics: Posted by ajay_m — Sat Aug 31, 2024 8:20 pm