Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for ADCs with other than 10 bit #43

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant