Skip to main content

Framebuf (non-displayio) driver for SSD1305 displays

Project description

Introduction

Documentation Status Discord Build Status Code Style: Ruff

Framebuf (non-displayio) driver for SSD1305 displays

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-ssd1305

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-ssd1305

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-ssd1305

Usage Example

# Basic example of clearing and drawing pixels on a SSD1305 OLED display.
# This example and library is meant to work with Adafruit CircuitPython API.
# Author: Tony DiCola
# License: Public Domain

# Import all board pins.
from board import SCL, SDA
import busio

# Import the SSD1305 module.
import adafruit_ssd1305


# Create the I2C interface.
i2c = busio.I2C(SCL, SDA)

# Create the SSD1305 OLED class.
# The first two parameters are the pixel width and pixel height.  Change these
# to the right size for your display!
display = adafruit_ssd1305.SSD1305_I2C(128, 32, i2c)
# Alternatively you can change the I2C address of the device with an addr parameter:
#display = adafruit_ssd1305.SSD1305_I2C(128, 32, i2c, addr=0x31)

# Clear the display.  Always call show after changing pixels to make the display
# update visible!
display.fill(0)

display.show()

Documentation

API documentation for this library can be found on Read the Docs.

For information on building library documentation, please check out this guide.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adafruit_circuitpython_ssd1305-1.4.5.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file adafruit_circuitpython_ssd1305-1.4.5.tar.gz.

File metadata

File hashes

Hashes for adafruit_circuitpython_ssd1305-1.4.5.tar.gz
Algorithm Hash digest
SHA256 3d448b721e0e7125a884bc19736aef3536ad7928288f5c2700ea40d11e8704e6
MD5 fbf7a64697da431ae750ab1cdbf8ac29
BLAKE2b-256 6cd1a5a64b70292e250cc9d99c1b38b87c4c97f23b7a871398019fe10fda8427

See more details on using hashes here.

File details

Details for the file adafruit_circuitpython_ssd1305-1.4.5-py3-none-any.whl.

File metadata

File hashes

Hashes for adafruit_circuitpython_ssd1305-1.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 67d8fe20f5f95a5e8b396d601deff74414df87d3753f5afa3135b4a8facbadd1
MD5 5545d983b30abb4e681a2a9dd8a8803e
BLAKE2b-256 7b3d282fadfb0e063365aec0412918fc21658acea29ea3ae2ccd4451ef4899ac

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page