|
本帖最后由 sun910231 于 2018-3-17 15:20 编辑
花屏应该通讯什么的没问题了,应该是取码的事,我找一下我用这个OLED显示箭头的程序,稍候~不知道能行不,那个屏我好长时间没玩了,要是还有问题告诉我一下,我可以找出来试试~
[kenrobot_code]#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);
#define width 13
#define height 44
static unsigned char bitmap[] U8G_PROGMEM = {
0x40,0x00,
0xe0,0x00,
0xf0,0x01,
0xf0,0x01,
0xf8,0x03,
0xfc,0x07,
0xfe,0x0f,
0xff,0x1f,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xf8,0x03,
0xff,0x1f,
0xfe,0x0f,
0xfc,0x07,
0xf8,0x03,
0xf0,0x01,
0xf0,0x01,
0xe0,0x00,
0x40,0x00,
};
void draw(void) {
// graphic commands to redraw the complete screen should be placed here
u8g.drawXBMP( 55, 10, width, height, bitmap);
}
void setup(void) {
}
void loop(void)
{
u8g.firstPage();
do
{
draw();
} while( u8g.nextPage() );
// 延时一定时间,再重绘图片
delay(1000);
}[/kenrobot_code]
|
|