Skip to content

Light sensor inversion not needed on current LK-Light-Sensor #606

@Felix-Sc

Description

@Felix-Sc

Despite the information on the Linkerkit webpage (http://www.linkerkit.de/index.php?title=LK-Light-Sen) the recent version of the light sensor seems to be already inverted. This means the values are getting larger when more light hits the sensor. This has been confirmed using the MBP, an Arduino UNO and a multimeter. The sample code on the Linkerkit webpage indicates that older revisions needed the inversion.
The AnalogInputReader class does an inversion of the value in line 39 of mbp_analog_reader.py.
resistenceSensor = ((1023 - v0[1])*10)/v0[1]
The inversion could either be removed or a bool added to the init function to toggle between value and inverted value.

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