Skip to content

Instantly share code, notes, and snippets.

@jake-walker
Created March 28, 2021 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jake-walker/bf6b7a13cac539551a30248c8e259bbf to your computer and use it in GitHub Desktop.
Save jake-walker/bf6b7a13cac539551a30248c8e259bbf to your computer and use it in GitHub Desktop.
ST7735 Update
sudo python3 -m pip uninstall ST7735 Adafruit-GPIO
sudo python3 -m pip install st7735
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
import ST7735
disp = ST7735.ST7735(port=0, cs=0, dc=24, backlight=None, rst=25, width=128, height=160, rotation=0, invert=False)
WIDTH = disp.width
HEIGHT = disp.height
img = Image.new('RGB', (WIDTH, HEIGHT))
draw = ImageDraw.Draw(img)
# Load default font.
font = ImageFont.load_default()
# Write some text
draw.text((5, 5), "Hello World!", font=font, fill=(255, 255, 255))
# Write buffer to display hardware, must be called to make things visible on the
# display!
disp.display(img)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment