Skip to content

Instantly share code, notes, and snippets.

View jcanderle's full-sized avatar

Jiri Canderle jcanderle

  • Panconnect
  • Brno
View GitHub Profile
@jcanderle
jcanderle / SSD1331.py
Last active September 14, 2016 08:09 — forked from TheRayTracer/SSD1331.py
The below Python3 source files control an OLED display (size 96 x 64, 65K colours) using a SSD1331 chipset and the SPI interface. The source code initialises the chipset and includes hardware accelerated functions for drawing primitive shapes and a non-hardware accelerated full ASCII set. Examples include a basic Space Invaders game, and a clock.
import struct
import spidev
import sys
import time
import random
import RPi.GPIO as gpio
ascii = [
[ 0x55, 0x00, 0x55, 0x00, 0x55 ],
[ 0x55, 0x00, 0x55, 0x00, 0x55 ],