Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

python-turtle on the 128x64 OLED Bonnet?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

python-turtle on the 128x64 OLED Bonnet?

by raspberrynut on Fri Sep 04, 2020 2:02 pm

Since the OLED is not a primary screen, is there a way to render turtle graphics to the OLED?

raspberrynut
 
Posts: 1
Joined: Fri Sep 04, 2020 1:57 pm

Re: python-turtle on the 128x64 OLED Bonnet?

by mikeysklar on Tue Sep 08, 2020 5:33 pm

raspberrynut,

Good question. I've never tried this, but in all the python turtle examples in our guides we are using a primary display with an init like this:

Code: Select all | TOGGLE FULL SIZE
turtle = turtle(board.DISPLAY)


I'm wondering if you used a variant of display that is more geared towards the i2c connection if it would work correctly:

Code: Select all | TOGGLE FULL SIZE
# Create the I2C interface.
i2c = busio.I2C(board.SCL, board.SDA)
# Create the SSD1306 OLED class.
turtle = adafruit_ssd1306.SSD1306_I2C(128, 64, i2c)


Let me know how it goes.

mikeysklar
 
Posts: 2069
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.