Verified Commit 215ecfdf authored by Rahix's avatar Rahix
Browse files

docs: Document light_sensor module


Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent 01c6b903
......@@ -24,6 +24,7 @@ Last but not least, if you want to start hacking the lower-level firmware, the
pycardium/color
pycardium/display
pycardium/leds
pycardium/light-sensor
pycardium/vibra
.. toctree::
......
``light_sensor`` - Ambient Brightness
=====================================
On the harmonic board, there is an IR-LED which can be used in reverse as a
crude brightness sensor. Values returned are in no particular unit but seem to
be fairly stable.
.. py:function:: light_sensor.start()
Turn on the ADC and start reading brightness values. This function must be
called before any measurements can be taken.
.. py:function:: light_sensor.get_reading()
Get an ambient brightness reading. The returned value is in no particular
unit, though it seems to be fairly stable. Common values:
- ~8: Very dark are
- ~17: Typical hackerspace brightness
- >200: Direct sunlight
:returns: A brightness reading in no particular unit
.. py:function:: light_sensor.stop()
Stop the ADC.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment