Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marek
firmware
Commits
215ecfdf
Verified
Commit
215ecfdf
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Patches
Plain Diff
docs: Document light_sensor module
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
01c6b903
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/index.rst
+1
-0
1 addition, 0 deletions
Documentation/index.rst
Documentation/pycardium/light-sensor.rst
+25
-0
25 additions, 0 deletions
Documentation/pycardium/light-sensor.rst
with
26 additions
and
0 deletions
Documentation/index.rst
+
1
−
0
View file @
215ecfdf
...
...
@@ -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::
...
...
This diff is collapsed.
Click to expand it.
Documentation/pycardium/light-sensor.rst
0 → 100644
+
25
−
0
View file @
215ecfdf
``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.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment