Skip to content

Commit 7a06f92

Browse files
committed
Update incomplete docs.
1 parent 9bcacca commit 7a06f92

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

adafruit_clue.py

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,17 +415,40 @@ def color(self):
415415
.. image :: ../docs/_static/proximity.jpg
416416
:alt: Color sensor
417417
418+
This example prints the values. Try holding something up to the sensor to see the values
419+
change. Works best with white LEDs enabled.
420+
421+
To use with the CLUE:
422+
423+
.. code-block:: python
424+
425+
from adafruit_clue import clue
426+
427+
while True:
428+
print("Color: R: {} G: {} B: {} C: {}".format(*clue.color))
418429
"""
419430
self._sensor.enable_color = True
420431
return self._sensor.color_data
421432

422433
@property
423434
def gesture(self):
424-
"""gesture code if detected. =0 if no gesture detected
425-
=1 if an UP, =2 if a DOWN, =3 if an LEFT, =4 if a RIGHT
435+
"""A gesture code if gesture is detected. Shows ``0`` if no gesture detected.
436+
``1`` if an UP gesture is detected, ``2`` if DOWN, ``3`` if LEFT, and ``4`` if RIGHT.
426437
427438
.. image :: ../docs/_static/proximity.jpg
428439
:alt: Gesture sensor
440+
441+
This example prints the gesture values. Try moving your hand up, down, left or right over
442+
the sensor to see the value change.
443+
444+
To use with the CLUE:
445+
446+
.. code-block:: python
447+
448+
from adafruit_clue import clue
449+
450+
while True:
451+
print("Gesture: {}".format(clue.gesture))
429452
"""
430453
self._sensor.enable_gesture = True
431454
return self._sensor.gesture()
@@ -797,7 +820,10 @@ def display_clue_data(title="CLUE Sensor Data", title_color=(255, 255, 255), tit
797820
``colors=((255, 255, 255), (255, 0, 0))`` would set the first line white
798821
and the second line red.
799822
800-
This example displays the acceleration, gyro and magnetic data on the display.
823+
.. image :: ../docs/_static/display_clue_data.jpg
824+
:alt: Display Clue Data demo
825+
826+
This example displays three lines with acceleration, gyro and magnetic data on the display.
801827
802828
.. code-block:: python
803829

docs/_static/display_clue_data.jpg

461 KB
Loading

0 commit comments

Comments
 (0)