This make Python code readable.
I guessed the "rst" syntax.
This commit is contained in:
parent
afd12d108d
commit
d467252efb
1 changed files with 11 additions and 9 deletions
20
README.rst
20
README.rst
|
|
@ -28,15 +28,17 @@ This is easily achieved by downloading
|
||||||
Usage Example
|
Usage Example
|
||||||
=============
|
=============
|
||||||
|
|
||||||
import adafruit_dotstar as dotstar
|
.. code-block:: python
|
||||||
import board
|
|
||||||
from led_animation import color
|
import adafruit_dotstar as dotstar
|
||||||
# setup the pixel
|
import board
|
||||||
dot = dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=.2)
|
from led_animation import color
|
||||||
# set the color by name
|
# setup the pixel
|
||||||
dot[0] = color.GOLD
|
dot = dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=.2)
|
||||||
# show the pixel
|
# set the color by name
|
||||||
dot.show()
|
dot[0] = color.GOLD
|
||||||
|
# show the pixel
|
||||||
|
dot.show()
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
============
|
============
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue