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

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

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

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

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

Comments

@Felix-Sc
Copy link
Contributor

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.

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