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

Hardcoded 3.3 volts in mbp_analog_reader.py #605

Open
Felix-Sc opened this issue Jun 25, 2021 · 0 comments
Open

Hardcoded 3.3 volts in mbp_analog_reader.py #605

Felix-Sc opened this issue Jun 25, 2021 · 0 comments

Comments

@Felix-Sc
Copy link
Contributor

The AnalogInputReader class uses a function called "get_level" to read analog values.
Line 27 goes as follows:
volts = (value*3.3)/1024
This hardcodes the voltage to 3.3.v
Most of the analog devices can also run on 5v. Some even need 5v.
The voltage could be passed to the class using the init function. Similar to how the adc_channel is passed to the class.

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

No branches or pull requests

1 participant