Skip to content

A simple library for using an I2C SH1106 display with STM32.

Notifications You must be signed in to change notification settings

Kikkiu17/STM32_SH1106

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

STM32_SH1106

A simple library for using an I2C SH1106 display with STM32.

Example

(Ignoring HAL autogenerated code)

int main(void)
{
  char text[] = "Hello World";
  SH1106_Init();
  SH1106_DrawHollowRect(29, 23, 97, 41, 1, BLUE);
  SH1106_WriteChars(32, 25, text, sizeof(text) - 1, Arial_12pt);
}

test You can also turn ON/OFF the display with SH1106_DisplayON() and SH1106_DisplayOFF(). For other functions, see the library header file Inc/sh1106.h.

Font generation

"The Dot Factory" has been used to generate the fonts (http://www.eran.io/the-dot-factory-an-lcd-font-and-image-generator/). With this program, you can generate bitmaps for any font you like. The only setting that you have to modify is "rotation": you have to put it to "90°", otherwise the font won't be printed correctly. Everything else can be left as-is - for more info check the readme file in Src.

Bitmap images

You can use any program to generate bitmaps for an image. For this project, I specifically used "LCD Assistant". The byte orientation has to be set to Vertical, with 8 pixels per byte. For more info check the readme file in Src.

About

A simple library for using an I2C SH1106 display with STM32.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages