Skip to main content

driver for micropython compatible with ssd1306 OLED displays.

Project description

SSD1306 Library

This repository contains a modified version of the micropython-ssd1306 library with the main objective of simplifying the installation process. This project has removed support for SPI and retains only the I2C functionality from the original library. All credits and acknowledgments go to the original author.

The focus of this repository is to prepare the library for uploading to PyPI and renaming it before the upload.

Test for the DUALMCU board:

import machine

i2c = machine.I2C(0, sda=machine.Pin(21), scl=machine.Pin(22))

print(i2c.scan())

thonny install

Code example

'''
    Unit Electronics 2023
           (o_
    (o_    //\
    (/)_   V_/_ 
    tested code mark
    version: 0.0.1
    revision: 0.0.1

'''

import machine
from ocks import SSD1306_I2C

i2c = machine.I2C(0,sda=machine.Pin(21), scl=machine.Pin(22))

oled = SSD1306_I2C(128, 32, i2c)

oled.fill(1)
oled.show()

oled.fill(0)
oled.show()
oled.text('UNIT', 50, 10)
oled.text('ELECTRONICS', 25, 20)

oled.show()

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

ocks-0.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

ocks-0.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file ocks-0.3.tar.gz.

File metadata

  • Download URL: ocks-0.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for ocks-0.3.tar.gz
Algorithm Hash digest
SHA256 389815aec2f4796e25d740b0c371d0e23b27296c2c4a04f07023cbb06c1a0033
MD5 c1bf00e0732db98967cbe0f5856444b9
BLAKE2b-256 9f3509879b9519d9deda9798eabae2451e393d8882bbc98bda1475f7f3d6094d

See more details on using hashes here.

File details

Details for the file ocks-0.3-py3-none-any.whl.

File metadata

  • Download URL: ocks-0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.9

File hashes

Hashes for ocks-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 067619a34785239ee0c7ff5988dd9e998fbb18d51fca0175fdc7926de3e139d0
MD5 ca3e8cacc3ed3e9b11b044a0bd873bd5
BLAKE2b-256 91f90abb0167d020e6b9f1ff3046d2e0b744bde61fe85de7698813a2a28e260c

See more details on using hashes here.

Supported by

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