Skip to content

Conversation

@ScruffR
Copy link

@ScruffR ScruffR commented Oct 15, 2023

Added support for ADCs with other than 10 bir resolution, by adding a optional paramter adcBits to constructor.
The constructor updates a member variable _adcMax to 2^adcBits-1.
Subsequent calculations are now using this variable instead of constants 1023/1024 (which are only correct for 10bit ADCs).

The addition of the optional parameter legacy code will not be affected by the change.

resolution, by adding a optional paramter `adcBits` to constructor. In constructor member variable _adcMax is set to 2^adcBits-1. Subsequent calculations are now using this variable instead of constants 1023/1024 (which are only correct for 10bit ADCs).
@caternuson caternuson mentioned this pull request Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant