Coder Social home page Coder Social logo

ssd1306-stm32hal-dma's Introduction

ssd1306-stm32HAL

ssd1306 library for stm32 using stm32-hal library's. This library works with i2c and is configured for 128x64 oled panels by default.

If you search 4-wire SPI support, you can find it in the afiskon/stm32-ssd1306 fork.

If you need a font generator to add custom fonts you can find it here: the-this-pointer/glcd-font-calculator.

Usage

Compile and link the library files in your project.

- font.c 
- ssd1306.c

A full example for stm32f411 discovery is located in the example folder.

Small example:

#include "ssd1306.h"
#include "fonts.h"

I2C_HandleTypeDef hi2c1;

// Init lcd using one of the stm32HAL i2c typedefs
ssd1306_Init(&hi2c1);

// Write data to local screenbuffer
ssd1306_SetCursor(0, 36);
ssd1306_WriteString("4ilo", Font_11x18, White);

// Copy all data from local screenbuffer to the screen
ssd1306_UpdateScreen(&hi2c1);

128x32 example

The library can be used with different screen sizes by redefining the SSD1306_WIDTH and SSD_1306_HEIGHT defines. Some smaller screens might be wired with interlacing, if you encounter issues related to interlacing defining SSD1306_COM_LR_REMAP will configure the controller to support this feature.

make EXTRA_CFLAGS="-DSSD1306_HEIGHT=32 -DSSD1306_COM_LR_REMAP"

ssd1306-stm32hal-dma's People

Contributors

4ilo avatar mkrysz avatar afiskon avatar the-this-pointer avatar

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.