单片机 OLED汉字取模

在这里插入图片描述

const char Hzk[][32]={
//                     温(0) 控(1) 风(2) 扇(3) 温(4) 度(5) ℃(6) 档(7)
//                      位(8) 模(9) 式(10) 智(11) 能(12) 调(13) 节(14) 语(15)
//                      音(16) 控(17) 制(18)
//                      温控风扇温度℃档位模式智能调节语音控制

                      {0x10,0x60,0x02,0x8C,0x00,0x00,0xFE,0x92,0x92,0x92,0x92,0x92,0xFE,0x00,0x00,0x00},
                      {0x04,0x04,0x7E,0x01,0x40,0x7E,0x42,0x42,0x7E,0x42,0x7E,0x42,0x42,0x7E,0x40,0x00},/*"温",0*/


};
void OLED_ShowCHinese(unsigned char x, unsigned char y, unsigned char no)
{
    unsigned char t, adder = 0;
    OLED_Set_Pos(x, y);
    for (t = 0; t < 16; t++)
    {
        OLED_WR_Byte(Hzk[2 * no][t], OLED_DATA);
        adder += 1;
    }
    OLED_Set_Pos(x, y + 1);
    for (t = 0; t < 16; t++)
    {
        OLED_WR_Byte(Hzk[2 * no + 1][t], OLED_DATA);
        adder += 1;
    }
}
发布了105 篇原创文章 · 获赞 8 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/x1131230123/article/details/104535260