Code Monkey home page Code Monkey logo

ssd1306-lib's Introduction

SSD1306-lib

Library for SSD1306 displays, currently for STM32 processors using I2C.

Description

Basic library for SSD1306 display, includes communication, GRAM writing, contrast setting and basic drawing tools (pixels, lines, characters, strings, lines, rectangles). Scrolling is also supported.


Overview

In addition to basic support, some support for undocumented features is also given here like setting control voltages to undocumented settings (though encouraged in datasheet), drawing to GRAM even when scrolling is used (just stop the scrolling, write the updated part of screen without the part that is scrolling (it is good idea to align the scrolling area to "pages" - see datasheet for what pages stand for)). Only display model UG2864KSWEG01 is supported, but other REAL SSD1306 displays should only differ in direction of row/column sequencing - can be easily worked out by flipping the image (supported in the driver).


Features

Basic features

  • I2C interface
  • Command sending
  • Buffered framebuffer (requires 1 kB of RAM)
  • Fast page sending
  • Whole GRAM sending using page sending
  • HW scrolling
  • Image mirroring, inverting etc.

Drawing primitives

  • Pixel
  • Line
  • Rectangle
  • Chars
  • Strings

Assisting functions

  • Easy init functions
  • Clearing the display buffer
  • Scrolling toggling
  • Contrast setting
  • Moving part of framebuffer one pixel up for SW scrolling

Porting

You need to rewrite several functions to port this library to anything other than STM32 with SPD libraries. However, the functions are well documented enough so it should be simple to rewrite it for any platform. All numbers use portable formats.


Example of use

See this project


Hackaday.io project page

Project page of this driver


References

Datasheet

ssd1306-lib's People

Contributors

mr-dos avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

mastertony04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.