MBP icon indicating copy to clipboard operation
MBP copied to clipboard

Hardcoded 3.3 volts in mbp_analog_reader.py

Open Felix-Sc opened this issue 4 years ago • 0 comments

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.

Felix-Sc avatar Jun 25 '21 13:06 Felix-Sc