MBP
MBP copied to clipboard
Hardcoded 3.3 volts in mbp_analog_reader.py
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.