Skip to content

External display and time.sleep patches. #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2019

Conversation

caternuson
Copy link
Contributor

Fixes #10 and #11. Also removed deprecated displayio calls.

Please let me know if these test are not adequate for #10.

Built In Display Test

PyPortal w/ CP 4.1.0

import board
from adafruit_turtle import Color, turtle

turtle = turtle(board.DISPLAY)
benzsize = min(board.DISPLAY.width, board.DISPLAY.height) * 0.5

print("Turtle time! Lets draw a rainbow benzene")

colors = (Color.RED, Color.ORANGE, Color.YELLOW, Color.GREEN, Color.BLUE, Color.PURPLE)

turtle.pendown()
start = turtle.pos()

for x in range(benzsize):
    turtle.pencolor(colors[x%6])
    turtle.forward(x)
    turtle.left(59)

while True:
    pass

pp

External Display Test

CPB w/ CP 5.0.0 alpha 4

import board
import busio
import displayio
from adafruit_st7789 import ST7789
from adafruit_turtle import Color, turtle

displayio.release_displays()

spi = busio.SPI(board.SCL, MOSI=board.SDA)
tft_cs = board.RX
tft_dc = board.TX
tft_backlight = board.A3

display_bus = displayio.FourWire(spi, command=tft_dc, chip_select=tft_cs)

display = ST7789(display_bus, width=240, height=240, rowstart=80,
                 backlight_pin=tft_backlight, rotation=180)

turtle = turtle(display)
benzsize = min(display.width, display.height) * 0.5

print("Turtle time! Lets draw a rainbow benzene")

colors = (Color.RED, Color.ORANGE, Color.YELLOW, Color.GREEN, Color.BLUE, Color.PURPLE)

turtle.pendown()
start = turtle.pos()

for x in range(benzsize):
    turtle.pencolor(colors[x%6])
    turtle.forward(x)
    turtle.left(59)

while True:
    pass

cpb_gizmo

@caternuson caternuson requested a review from a team October 15, 2019 18:58
@ladyada ladyada merged commit 0808605 into adafruit:master Oct 15, 2019
@ladyada
Copy link
Member

ladyada commented Oct 15, 2019

yay!

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 15, 2019
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 3.0.2 from 3.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#79 from brentru/check-pem-begin-statement

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP4725 to 1.2.0 from 1.1.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP4725#9 from caternuson/iss8_busdevice

Updating https://github.com/adafruit/Adafruit_CircuitPython_Pixie to 1.1.5 from 1.1.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_Pixie#12 from kattni/example-update
  > Merge pull request adafruit/Adafruit_CircuitPython_Pixie#11 from kattni/add-pyserial

Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.5.3 from 3.5.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#41 from makermelissa/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_AWS_IOT to 1.0.1 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_AWS_IOT#2 from brentru/fix-esp32spi-method-names

Updating https://github.com/adafruit/Adafruit_CircuitPython_turtle to 1.1.1 from 1.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_turtle#12 from caternuson/disp_fix

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Added the following libraries: Adafruit_CircuitPython_LSM303_Accel, Adafruit_CircuitPython_LSM303AGR_Mag, Adafruit_CircuitPython_LSM303DLH_Mag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

internal time.sleep(0.003) hacks are required but limit speed
2 participants