Skip to content

mokhwasomssi/stm32_hal_ssd1306

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stm32_hal_ssd1306

SSD1306, I2C, STM32 HAL

0. Development environment

1. Feature

  • Use I2C interface
  • Write string on the screen
  • SSD1306 commands are defined as functions

2. User Configuration

  • I2C1

STM32CubeMx Configuration

image

ssd1306.h

/* SSD1306 Interface */ 
#define SSD1306_I2C                     (&hi2c1)

3. main.c

stm32f411_fw_ssd1306/Core/Src/main.c

#include "ssd1306.h"

int main(void)
{
    ssd1306_init();

    ssd1306_write_string(font6x8, "ABC");
    ssd1306_enter();

    ssd1306_write_string(font7x10, "ABC");
    ssd1306_enter();

    ssd1306_write_string(font11x18, "ABC");
    ssd1306_enter();

    ssd1306_write_string(font16x26, "ABC");
    ssd1306_enter();

    ssd1306_update_screen();
}

Reference

https://github.com/afiskon/stm32-ssd1306

Releases

No releases published

Packages

No packages published