File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,13 @@ Introduction
13
13
:target: https://travis-ci.org/adafruit/Adafruit_CircuitPython_WS2801
14
14
:alt: Build Status
15
15
16
- .. todo :: Describe what the library does.
16
+ Higher level WS2801 driver that presents the LED string as a sequence.
17
+ It is the same api as the
18
+ `NeoPixel library <https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel >`_.
19
+
20
+ Colors are stored as tuples by default. However, you can also use int hex syntax
21
+ to set values similar to colors on the web. For example, ``0x800000 `` (``#800000 ``
22
+ on the web) is equivalent to ``(0x80, 0, 0) ``.
17
23
18
24
Dependencies
19
25
=============
@@ -29,7 +35,17 @@ This is easily achieved by downloading
29
35
Usage Example
30
36
=============
31
37
32
- .. todo :: Add a quick, simple example. It and other examples should live in the examples folder and be included in docs/examples.rst.
38
+ This example demonstrates the library driving
39
+ `a strand of 25 RGB leds <https://www.adafruit.com/product/322 >`_ by a
40
+ `Gemma M0 <https://www.adafruit.com/product/3501 >`_ using the hardware SPI capable outputs.
41
+
42
+ .. code-block :: python
43
+
44
+ import board
45
+ import adafruit_ws2801
46
+
47
+ leds = adafruit_ws2801.WS2801(board.D2, board.D0, 25 )
48
+ leds.fill((0x 80 , 0 , 0 ))
33
49
34
50
Contributing
35
51
============
You can’t perform that action at this time.
0 commit comments