@@ -415,17 +415,40 @@ def color(self):
415
415
.. image :: ../docs/_static/proximity.jpg
416
416
:alt: Color sensor
417
417
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))
418
429
"""
419
430
self ._sensor .enable_color = True
420
431
return self ._sensor .color_data
421
432
422
433
@property
423
434
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.
426
437
427
438
.. image :: ../docs/_static/proximity.jpg
428
439
: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))
429
452
"""
430
453
self ._sensor .enable_gesture = True
431
454
return self ._sensor .gesture ()
@@ -797,7 +820,10 @@ def display_clue_data(title="CLUE Sensor Data", title_color=(255, 255, 255), tit
797
820
``colors=((255, 255, 255), (255, 0, 0))`` would set the first line white
798
821
and the second line red.
799
822
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.
801
827
802
828
.. code-block:: python
803
829
0 commit comments