From d467252efba1246bc4d2a2aa460a8e81053af0bf Mon Sep 17 00:00:00 2001 From: David Glaude Date: Wed, 29 Jan 2020 00:12:07 +0100 Subject: [PATCH] This make Python code readable. I guessed the "rst" syntax. --- README.rst | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index 91e2ed8..13a9f67 100644 --- a/README.rst +++ b/README.rst @@ -28,15 +28,17 @@ This is easily achieved by downloading Usage Example ============= -import adafruit_dotstar as dotstar -import board -from led_animation import color -# setup the pixel -dot = dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=.2) -# set the color by name -dot[0] = color.GOLD -# show the pixel -dot.show() +.. code-block:: python + + import adafruit_dotstar as dotstar + import board + from led_animation import color + # setup the pixel + dot = dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=.2) + # set the color by name + dot[0] = color.GOLD + # show the pixel + dot.show() Contributing ============