Skip to content

Hardcoded 3.3 volts in mbp_analog_reader.py  #605

@Felix-Sc

Description

@Felix-Sc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions