File tree Expand file tree Collapse file tree 1 file changed +25
-6
lines changed Expand file tree Collapse file tree 1 file changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,6 @@ This is easily achieved by downloading
2929
3030Installing from PyPI
3131=====================
32- .. note :: This library is not available on PyPI yet. Install documentation is included
33- as a standard element. Stay tuned for PyPI availability!
34-
35- .. todo :: Remove the above note if PyPI version is/will be available at time of release.
36- If the library is not planned for PyPI, remove the entire 'Installing from PyPI' section.
3732
3833On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
3934PyPI <https://pypi.org/project/adafruit-circuitpython-turtle/> `_. To install for current user:
@@ -60,7 +55,31 @@ To install in a virtual environment in your current project:
6055 Usage Example
6156=============
6257
63- .. todo :: Add a quick, simple example. It and other examples should live in the examples folder and be included in docs/examples.rst.
58+ .. code-block :: python
59+
60+ import board
61+ from adafruit_turtle import Color, turtle
62+
63+ turtle = turtle(board.DISPLAY )
64+ starsize = min (board.DISPLAY .width, board.DISPLAY .height) * 0.9 # 90% of screensize
65+
66+ print (" Turtle time! Lets draw a star" )
67+
68+ turtle.pencolor(Color.BLUE )
69+
70+ turtle.penup()
71+ turtle.goto(- starsize/ 2 , 0 )
72+ turtle.pendown()
73+
74+ start = turtle.pos()
75+ while True :
76+ turtle.forward(starsize)
77+ turtle.left(170 )
78+ if abs (turtle.pos() - start) < 1 :
79+ break
80+
81+ while True :
82+ pass
6483
6584 Contributing
6685============
You can’t perform that action at this time.
0 commit comments