项目场景:Bad apple
屏幕右面有竖线,两根
问题描述:买到老版的oled屏了
具体更改参考这个:https://blog.csdn.net/x1131230123/article/details/102733750
// Write the screenbuffer with changed to the screen
void ssd1306_UpdateScreen(void) {
uint8_t i;
for(i = 0; i < 8; i++) {
ssd1306_WriteCommand(0xB0 + i);
ssd1306_WriteCommand(0x02);//此处由0x00修改为0x02,老版本的oled屏
ssd1306_WriteCommand(0x10);
ssd1306_WriteData(&SSD1306_Buffer[SSD1306_WIDTH*i],SSD1306_WIDTH);
}
}//
https://github.com/afiskon/stm32-ssd1306
原因分析及解决方案:
老版本oled