You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is expected behavior, readSingle and similar methods return negative values for differential measurements. If you're measuring in single-ended mode you need to cast to uint16_t (this is also in the documentation).
I have to use this way to get the correct value:
int val = (uint16_t)adc.readSingle();
The text was updated successfully, but these errors were encountered: