adafruit / adafruit_circuitpython_ssd1327 Goto Github PK
View Code? Open in Web Editor NEWDisplayIO drivers for grayscale OLEDs driven by SSD1327
License: MIT License
DisplayIO drivers for grayscale OLEDs driven by SSD1327
License: MIT License
in examples/
I have a custom Pi 4 Compute Module board with the "Adafruit Grayscale 1.5" 128x128 OLED Display" and an I2C LED driver on I2C1. I have the I2C LED driver working on the bus no problem. I am trying to get the adafruit_ssd1327 library running. When I run the example code, I get garbage displayed on the screen. I see traffic on the I2C1 bus when I run the code but the data does not look correct. It looks like a 0x80 is getting inserted every other byte.
There are missing type annotations for some functions in this library.
The typing
module does not exist on CircuitPython devices so the import needs to be wrapped in try/except to catch the error for missing import. There is an example of how that is done here:
try:
from typing import List, Tuple
except ImportError:
pass
Once imported the typing annotations for the argument type(s), and return type(s) can be added to the function signature. Here is an example of a function that has had this done already:
def wrap_text_to_pixels(
string: str, max_width: int, font=None, indent0: str = "", indent1: str = ""
) -> List[str]:
If you are new to Git or Github we have a guide about contributing to our projects here: https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github
There is also a guide that covers our CI utilities and how to run them locally to ensure they will pass in Github Actions here: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/check-your-code In particular the pages: Sharing docs on ReadTheDocs
and Check your code with pre-commit
contain the tools to install and commands to run locally to run the checks.
If you are attempting to resolve this issue and need help, you can post a comment on this issue and tag both @FoamyGuy and @kattni or reach out to us on Discord: https://adafru.it/discord in the #circuitpython-dev
channel.
The following locations are reported by mypy to be missing type annotations:
The driver for the ssd1327 does not appear on pypi.
Driver: https://github.com/adafruit/Adafruit_CircuitPython_SSD1327
The search page: https://pypi.org/search/?q=ssd1327
To get this screen working on a Raspberry Pi Zero 2 W without having to use a CircuitPython image, I needed the following Python dependencies:
adafruit-blinka-displayio
adafruit-circuitpython-display-text
adafruit-circuitpython-ssd1327
RPi.GPIO
I've opened this issue for others that may be struggling to do the same thing because I couldn't find instructions anywhere.
Hi,
Is there a way to modify the init sequence without re compiling the lib?
For example, let say I would like to change the contrast value:
b"\x81\x01\x80" # set contrast control
Is there a way to pass another value than x80 as an argument to override it?
Not really an issue but I didn't where else to ask.
Thanks!
I have some problem running this code on jetson nano:raise ValueError(
ValueError: No Hardware SPI on (SCLK, MOSI, MISO)=(GEN2_I2C_SCL, GEN2_I2C_SDA, None)
Valid SPI ports:((0, SPI1_SCK, SPI1_MOSI, SPI1_MISO), (1, SPI2_SCK, SPI2_MOSI, SPI2_MISO))
I'll be very thankful to the one who tells me how to solve it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.