Skip to main content

Turtle graphics library for CircuitPython and displayio

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

Turtle graphics library for CircuitPython and displayio

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-turtle

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-turtle

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-turtle

Usage Example

import board
from adafruit_turtle import Color, turtle

turtle = turtle(board.DISPLAY)
starsize = min(board.DISPLAY.width, board.DISPLAY.height) * 0.9  # 90% of screensize

print("Turtle time! Lets draw a star")

turtle.pencolor(Color.BLUE)

turtle.penup()
turtle.goto(-starsize/2, 0)
turtle.pendown()

start = turtle.pos()
while True:
    turtle.forward(starsize)
    turtle.left(170)
    if abs(turtle.pos() - start) < 1:
        break

while True:
    pass

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit_circuitpython_turtle-3.1.9.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adafruit_circuitpython_turtle-3.1.9-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file adafruit_circuitpython_turtle-3.1.9.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_turtle-3.1.9.tar.gz
Algorithm Hash digest
SHA256 c1685d1088a0c733188feb19bec3a2d24246eb5014b8ac0dbb7f30c2e3b40d2e
MD5 ff2105e186e58a689e6c770c3de85519
BLAKE2b-256 a2f5b44bd05a4676e7996bd562ded7ebc171170155f90099b2c335c91d77dd72

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_turtle-3.1.9-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_turtle-3.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 e25174c9e8d543f7cbd915d1f0fb135e2162c134fe3597aede626f478f71074a
MD5 101a6766550cb3c0b1b9616f90d052a8
BLAKE2b-256 a744868d673511c8448260f21c1a909e3ea569490c0554d769ed08ad2284153e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page