Posts

Showing posts from June, 2023

Exercise of using bitmaptools.draw_polygon() added in CircuitPython 8.1.0

Image
Exercise of using bitmaptools.draw_polygon() added in CircuitPython 8.1.0 ( Release Notes for 8.1.0 ). Tested on Raspberry Pi Pico/CircuitPython 8.1.0 with SSD1331 SPI color OLED . exCpyPico_SSD1331_polygon.py , a simple exercise using bitmaptools.draw_polygon(). """ Simple Test 0.95" 96x64 SSD1331 SPI Color OLED run on Raspberry Pi Pico (RP2040)/CircuitPython 8.1.0 Exercse of using bitmaptools.draw_polygon() https://docs.circuitpython.org/en/latest/shared-bindings/bitmaptools/index.html#bitmaptools.draw_polygon Connection: SD1331 RPi Pico ----------------------------- CS GP0 DC GP1 RES GP4 SDA GP3 SCL GP2 VCC 3V3 GND GND """ import board import busio import terminalio import displayio import adafruit_ssd1331 import bitmaptools import time # Release any resources currently in use for the displays displayio.release_displays() # init display disp_clk = board.GP2 dis...

Raspberry Pi Pico/CircuitPython 8 to drive SSD1331 SPI color OLED

Image
Exercises to display on 0.95" 96x64 SSD1331 SPI Color OLED with Raspberry Pi Pico /CircuitPython 8.1.0. Connection between Raspberry Pi Pico and SSD1331 Color SPI OLED: Exercise code: exCpyPico_SSD1331.py , a simple Hello World example. """ Simple Test 0.95" 96x64 SSD1331 SPI Color OLED run on Raspberry Pi Pico (RP2040)/CircuitPython 8.1.0 Connection: SD1331 RPi Pico ----------------------------- CS GP0 DC GP1 RES GP4 SDA GP3 SCL GP2 VCC 3V3 GND GND """ import board import busio import terminalio import displayio import adafruit_ssd1331 from adafruit_display_text import label # Release any resources currently in use for the displays displayio.release_displays() # init display disp_clk = board.GP2 disp_mosi = board.GP3 disp_spi = busio.SPI(clock=disp_clk, MOSI=disp_mosi) disp_res = board.GP4 disp_dc = board.GP1 disp_cs = board.GP0 display_bus = ...