Skip to content

Commit

Permalink
Updated index.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
speratus committed Jul 23, 2019
1 parent 64a848f commit 8e7576f
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,30 @@ Here are some of the features that blinkter offers.

Quick demonstration
-------------------
Cycle through the basic colors.
.. code-block::python3
import time
from blinkter import BlinktBoard
board = BlinktBoard()
pixel = board.get_pixel(0) #As with blinkt, the pixels are labelled 0-7.
pixel.red()
time.sleep(1)
pixel.green()
time.sleep(1)
pixel.blue()
time.sleep(3)
pixel.black() #Turn the pixel off when you're done.
Cause a pixel to flash once.
.. code-block::python3
pixel.flash(r=255, duration=0.1)
Blink a pixel repeatedly
.. code-block::python3
pixel.start_blink(g=255, on_length=0.075, off_length=0.2)
time.sleep(3)
pixel.stop_blink()
Cycle through the basic colors.::

import time
from blinkter import BlinktBoard

board = BlinktBoard()
pixel = board.get_pixel(0) #As with blinkt, the pixels are labelled 0-7.
pixel.red()
time.sleep(1)
pixel.green()
time.sleep(1)
pixel.blue()
time.sleep(3)
pixel.black() #Turn the pixel off when you're done.

Cause a pixel to flash once.::

pixel.flash(r=255, duration=0.1)

Blink a pixel repeatedly::

pixel.start_blink(g=255, on_length=0.075, off_length=0.2)
time.sleep(3)
pixel.stop_blink()



Expand Down

0 comments on commit 8e7576f

Please sign in to comment.