Arduino入门3——库的调用,打开0.96寸oled的正确方式

Arduino入门3------库的调用,打开0.96寸oled的正确方式

上期,我们总结了Arduino中一些基本的函数,这一期我们来接触Arduino中另一个重要的内容,库的调用。

oled简介

LED,即有机发光二极管(Organic Light-Emitting Diode),又称为有机激光显示(Organic Electroluminesence Display)。

OLED显示屏就是利用有机发光二极管制成的显示屏,只要在正负极上加上正确的电压就会发光。

这次我们学习的就是市面上常见的0.96寸OLED屏幕,黄蓝屏,上1/4为黄色,下3/4为蓝色。使用的是SPI通信,分辨率为128*64。

接口定义

  • RES: 复位引脚
  • D/C:数据/命令标志(0,命令;1,数据)
  • CS: 片选信号
  • CLK: SPI时钟线
  • DIO:SPI数据线
  • NC:不连
  • GND:模块接地端
  • VCC:模块电源端

这里不做关于oled的深入介绍,如果想了解的可以看:夜深人静学32系列17------OLED

oled相关的库

Arduino相对于其他嵌入式编译平台的最显著区别就是,Arduino和使用和上手非常简单(仅个人观点),这一优势,有很大一部分原因是Arduino提供了各种各样的库供用户使用,用户只需要对这些库进行调用,就可以快速上手,甚至可以不太了解外设的工作原理。。。。。。

Arduino的库可以大致分为三类:

  1. 核心库:这些库是Arduino IDE自带的,用于支持基本的Arduino功能,例如(用于I2C通信)、(用于SPI通信)、(串口通信)等
  2. 标准库:这些库是由Arduino社区或官方发布的,用于支持特定硬件设备或通用功能,如LCD显示器、SD卡、以太网模块等。
  3. 第三方库:这些库由Arduino社区或其他开发者开发和维护,覆盖了各种外部设备、传感器和通信模块。包括我们本期学习的0.96寸oled

以我们本期的0.96寸oled为例,通过ssd1306芯片驱动,使用SPI通讯,那么需要的库对于就有以下三种:

  • SPI:SPI功能的封装库,对SPI底层操作进行封装,只需要简单的调用该库的库函数,即可轻松使用,这个是Arduino自带的,不需要额外安装
  • Adafruti_GFX:Adafruti_GFX库是LCD和OLED屏幕通用父类库,它始终与某种特定显示类型的子类库一起使用,子类库依赖父类库。需要额外安装。
  • Adafruti_SSD1306:使用SSD1306驱动芯片的屏幕所对应的Arduino库,该库包含很多特定功能的库函数,可以控制SSD1306驱动的OLED屏。需要额外安装。

Arduino库的安装方法:

安装方法很简单,Arduino界面点击工具->库管理->输入对应的库名称下载即可

常用函数

Arduino语音是使用C和C++为基础的,Arduino的库则一般是C++实现的,因此我们在调用oled库函数之前,需要先创建一个类,用于调用,不同的通讯方式实现如下:

  1. 软件SPI
c 复制代码
/*软件模拟SPI的接口*/
// Declaration for SSD1306 display connected using software SPI (default case):
#define OLED_MOSI   9    //数据线
#define OLED_CLK   10    //时钟线
#define OLED_DC    11    //数据/命令标志(0,命令;1,数据)
#define OLED_CS    12    //片选信号
#define OLED_RESET 13    //复位信号
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,     //这个是软件SPI的构造函数,创建了一个Adafruit_SSD1306类,类的名字叫做display
  OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);
  1. 硬件SPI
c 复制代码
/*
下面是硬件SPI的接口,如果需要使用硬件SPI,则将下面取消注释,注释上面软件SPI接口即可
*/
 Comment out above, uncomment this block to use hardware SPI
#define OLED_DC     6
#define OLED_CS     7
#define OLED_RESET  8
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,     //这个是硬件SPI的构造函数,创建了一个Adafruit_SSD1306类,类的名字叫做display
  &SPI, OLED_DC, OLED_RESET, OLED_CS);
  1. 硬件IIC
c 复制代码
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
// The pins for I2C are defined by the Wire-library. 
// On an arduino UNO:       A4(SDA), A5(SCL)
// On an arduino MEGA 2560: 20(SDA), 21(SCL)
// On an arduino LEONARDO:   2(SDA),  3(SCL), ...
#define OLED_RESET     -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#define SCREEN_ADDRESS 0x3D ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);

下面是一些驱动oled常用的函数

函数名 描述
display.begin(SSD1306_SWITCHCAPVCC) oled初始化函数,设置oled工作电压,SSD1306_SWITCHCAPVCC表示工作电压为3.3V
display.clearDisplay(); 清除缓冲区函数,清屏函数
display.display(); 显示当前缓冲区内的内容
display.setTextSize(s); 设置字体大小,参数S = 1/2/3...
display.setCursor(x,y); 设置光标位置,参数为坐标
display.setTextColor(value); 设置字体颜色,默认WHITE
display.steTextWrap(); 设置自动换行,参数为true或者false、
display.print(); 输出内容到缓存函数,,只能输出英文,中文会乱码
display.drawBitmap(x,y,Bitmap,w,h,c); x,y是图像的坐标,Bitmap为图像数据(可以是数组名,也可以是指针),w,h,为图像的宽和高,c是颜色,

oled显示字符

显示字符很简单,使用如下代码即可

c 复制代码
/*头文件包含*/
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

/*OLED屏幕的参数像素点配置,*/
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels

/*软件模拟SPI的接口*/
// Declaration for SSD1306 display connected using software SPI (default case):
#define OLED_MOSI   9    //数据线
#define OLED_CLK   10    //时钟线
#define OLED_DC    11    //数据/命令标志(0,命令;1,数据)
#define OLED_CS    12    //片选信号
#define OLED_RESET 13    //复位信号
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,     //这个是软件SPI的构造函数,创建了一个Adafruit_SSD1306类,类的名字叫做display
  OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);

/*下面是硬件SPI的接口,如果需要使用硬件SPI,则将下面取消注释,注释上面软件SPI接口即可*/
/* Comment out above, uncomment this block to use hardware SPI
#define OLED_DC     6
#define OLED_CS     7
#define OLED_RESET  8
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,     //这个是硬件SPI的构造函数,创建了一个Adafruit_SSD1306类,类的名字叫做display
  &SPI, OLED_DC, OLED_RESET, OLED_CS);
*/

/*
下面是一些比较基础的函数
display.clearDisplay();               //清除缓冲区函数,清屏函数
display.display();            //显示当前缓冲区内的内容
display.setTextSize(s);               //设置字体大小,参数S = 1/2/3....
display.setCursor(x,y);               //设置光标位置,参数为坐标
display.setTextColor(value);          //设置字体颜色,默认WHITE
display.steTextWrap();                //设置自动换行,参数为true或者false
display.drawBitmap(x,y,Bitmap,w,h,c); //x,y是图像的坐标,Bitmap为图像数据(可以是数组名,也可以是指针),w,h,为图像的宽和高,c是颜色,

*/

void setup() {
  Serial.begin(9600);

  // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
  //display.begin这个函数还有其他的参数,但是这里是C++的语法,提供的库函数里面有默认参数,所以可以不用填。默认即可。
  if(!display.begin(SSD1306_SWITCHCAPVCC)) {
    Serial.println(F("SSD1306 allocation failed"));
    for(;;); // Don't proceed, loop forever
  }
    display.clearDisplay();   //清除缓存
  display.setTextSize(2);     //设置字体大小,默认是1,写入2就是放大1呗,以此类推
  display.setTextColor(1);    //设置字体颜色,对于oled来说,写1是有颜色,0是没颜色
  display.setCursor(0,0);     //设置光标位置,后面填写地址,都是相对于光标的偏移量
  display.print("Hello");        //输出"Hello"到缓存里面,只能显示英文,中文会乱码
  display.display();            //显示当前缓冲区内的内容


}

void loop() {
}

效果如下:

oled显示中文、图片

1 .显示中文和图片原理相同,都是对对图片进行取模,本质上图片和中文都是以图片的形式显示

  1. 驱魔软件叫做:PCtoLCD2002 ,自己去网上下载即可,

  2. 打开PCtoLCD2002 ,进行如下配置:

  3. 进行图示操作,获得字模数据

  4. 图片操作方式同中文字符,只需要将字符修改为图形模式即可,但是要求取模的图片为BMP格式,大小在128X64以内,否则无法正常显示

下面是示例代码

c 复制代码
/*头文件包含*/
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

/*OLED屏幕的参数像素点配置,*/
#define SCREEN_WIDTH 128  // OLED display width, in pixels
#define SCREEN_HEIGHT 64  // OLED display height, in pixels

/*软件模拟SPI的接口*/
// Declaration for SSD1306 display connected using software SPI (default case):
#define OLED_MOSI 9                                    //数据线
#define OLED_CLK 10                                    //时钟线
#define OLED_DC 11                                     //数据/命令标志(0,命令;1,数据)
#define OLED_CS 12                                     //片选信号
#define OLED_RESET 13                                  //复位信号
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,  //这个是软件SPI的构造函数,创建了一个Adafruit_SSD1306类,类的名字叫做display
                         OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);

/*下面是硬件SPI的接口,如果需要使用硬件SPI,则将下面取消注释,注释上面软件SPI接口即可*/
/* Comment out above, uncomment this block to use hardware SPI
#define OLED_DC     6
#define OLED_CS     7
#define OLED_RESET  8
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,     //这个是硬件SPI的构造函数,创建了一个Adafruit_SSD1306类,类的名字叫做display
  &SPI, OLED_DC, OLED_RESET, OLED_CS);
*/

/*
下面是一些比较基础的函数
display.clearDisplay();               //清除缓冲区函数,清屏函数
display.display();            //显示当前缓冲区内的内容
display.setTextSize(s);               //设置字体大小,参数S = 1/2/3....
display.setCursor(x,y);               //设置光标位置,参数为坐标
display.setTextColor(value);          //设置字体颜色,默认WHITE
display.steTextWrap();                //设置自动换行,参数为true或者false
display.drawBitmap(x,y,Bitmap,w,h,c); //x,y是图像的坐标,Bitmap为图像数据(可以是数组名,也可以是指针),w,h,为图像的宽和高,c是颜色,

*/
static const unsigned char PROGMEM Bu[] = {
  0x00, 0x00, 0x7F, 0xFC, 0x00, 0x80, 0x00, 0x80, 0x01, 0x00, 0x01, 0x00, 0x03, 0x40, 0x05, 0x20,
  0x09, 0x10, 0x11, 0x08, 0x21, 0x04, 0x41, 0x04, 0x81, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, /*"不",0*/
};
static const unsigned char PROGMEM Xiang[] = {
  0x08, 0x00, 0x08, 0xF8, 0x08, 0x88, 0x7E, 0x88, 0x08, 0xF8, 0x18, 0x88, 0x1C, 0xF8, 0x2A, 0x88,
  0x48, 0x88, 0x08, 0xF8, 0x01, 0x00, 0x08, 0x84, 0x48, 0x92, 0x48, 0x12, 0x87, 0xF0, 0x00, 0x00, /*"想",1*/
};
static const unsigned char PROGMEM Xie[] = {
  0x00, 0x00, 0x7F, 0xFE, 0x40, 0x02, 0x90, 0x04, 0x10, 0x00, 0x1F, 0xF8, 0x10, 0x00, 0x20, 0x00,
  0x3F, 0xF8, 0x00, 0x08, 0x00, 0x08, 0xFF, 0xC8, 0x00, 0x08, 0x00, 0x08, 0x00, 0x50, 0x00, 0x20, /*"写",2*/
};
static const unsigned char PROGMEM Dai[] = {
  0x08, 0x90, 0x08, 0x88, 0x08, 0x88, 0x10, 0x80, 0x10, 0xBE, 0x37, 0xC0, 0x30, 0x80, 0x50, 0x40,
  0x90, 0x40, 0x10, 0x40, 0x10, 0x20, 0x10, 0x22, 0x10, 0x12, 0x10, 0x0A, 0x10, 0x06, 0x10, 0x02, /*"代",3*/
};
static const unsigned char PROGMEM Ma[] = {
  0x00, 0x00, 0x01, 0xF8, 0xFC, 0x08, 0x10, 0x08, 0x10, 0x88, 0x20, 0x88, 0x3C, 0x88, 0x64, 0xFE,
  0x64, 0x02, 0xA4, 0x02, 0x24, 0x02, 0x25, 0xFA, 0x3C, 0x02, 0x24, 0x02, 0x20, 0x14, 0x00, 0x08, /*"码",4*/
};
static const unsigned char PROGMEM De[] = {
  0x10, 0x40, 0x10, 0x40, 0x20, 0x40, 0x7E, 0x7C, 0x42, 0x84, 0x42, 0x84, 0x43, 0x04, 0x42, 0x44,
  0x7E, 0x24, 0x42, 0x24, 0x42, 0x04, 0x42, 0x04, 0x42, 0x04, 0x7E, 0x04, 0x42, 0x28, 0x00, 0x10, /*"的",5*/
};
static const unsigned char PROGMEM Wo[] = {
  0x04, 0x40, 0x0E, 0x50, 0x78, 0x48, 0x08, 0x48, 0x08, 0x40, 0xFF, 0xFE, 0x08, 0x40, 0x08, 0x44,
  0x0A, 0x44, 0x0C, 0x48, 0x18, 0x30, 0x68, 0x22, 0x08, 0x52, 0x08, 0x8A, 0x2B, 0x06, 0x10, 0x02,
  /*"我",6*/
};

static const unsigned char PROGMEM Pic_Niu[] = {
0x30,0x00,0x00,0x18,0x70,0x00,0x00,0x1C,0x78,0x00,0x00,0x3C,0x58,0x00,0x00,0x3C,
0xCC,0x0F,0xE0,0x6C,0xE7,0x7F,0xFD,0xCC,0x63,0xF0,0x1F,0x8C,0x61,0xC0,0x07,0x0C,
0x77,0x00,0x01,0xD8,0xFE,0x00,0x00,0xFE,0xFC,0x00,0x00,0x7E,0xF8,0x00,0x00,0x2E,
0x7B,0x80,0x03,0xBC,0x33,0x80,0x03,0xB8,0x30,0x00,0x00,0x18,0x30,0x3F,0xF8,0x18,
0x33,0xFF,0xFF,0x98,0x3F,0xC0,0x07,0xF8,0x3C,0x00,0x00,0x78,0x70,0x00,0x00,0x1C,
0xE0,0x00,0x00,0x0E,0xC0,0xE0,0x0E,0x06,0x81,0xF0,0x1F,0x03,0x81,0xB0,0x1B,0x03,
0x81,0xF0,0x1E,0x03,0xC0,0x40,0x04,0x06,0xE0,0x00,0x00,0x0E,0x70,0x00,0x00,0x1C,
0x3C,0x00,0x00,0x78,0x0F,0xC0,0x07,0xE1,0x07,0xFF,0xFF,0xC3,0x06,0x3F,0xF8,0xC3,
0x0C,0x00,0x00,0x7E,0x0C,0x03,0x80,0x7C,0x0C,0x0F,0xE0,0x70,0x0C,0x0C,0x60,0x60,
0x06,0x0C,0x60,0xC0,0x07,0x0C,0x61,0xC0,0x03,0x8C,0x63,0x80,0x01,0xFC,0x7F,0x00,/*"D:\tools\Arduino\素材\牛.bmp",0*/
};



// static const unsigned char* PROGMEM Chinese[7] =
// {
// BU,Xiang,Xie,Dai,Ma,De,Wo
// }
void setup() {
  Serial.begin(9600);

  // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
  //display.begin这个函数还有其他的参数,但是这里是C++的语法,提供的库函数里面有默认参数,所以可以不用填。默认即可。
  if (!display.begin(SSD1306_SWITCHCAPVCC)) {
    Serial.println(F("SSD1306 allocation failed"));
    for (;;)
      ;  // Don't proceed, loop forever
  }
  display.clearDisplay();   //清除缓存
  display.setTextColor(1);  //设置字体颜色,对于oled来说,写1是有颜色,0是没颜色
  display.setTextSize(2);   //设置字体大小,默认是1,写入2就是放大1呗,以此类推
  display.setCursor(0, 0);  //设置光标位置,后面填写地址,都是相对于光标的偏移量
  display.print("Hello");   //输出"Hello"到缓存里面,只能显示英文,中文会乱码
  display.drawBitmap(0,16,Bu,16,16,1);     //显示中文"不"
  display.drawBitmap(16,16,Xiang,16,16,1);     //显示中文"想"
  display.drawBitmap(32,16,Xie,16,16,1);     //显示中文"写"
  display.drawBitmap(48,16,Dai,16,16,1);     //显示中文"代"
  display.drawBitmap(64,16,Ma,16,16,1);     //显示中文"码"
  display.drawBitmap(80,16,De,16,16,1);     //显示中文"的"
  display.drawBitmap(96,16,Wo,16,16,1);     //显示中文"我"
  display.drawBitmap(0,32,Pic_Niu,32,40,1);     //显示图片牛

  display.display();        //显示当前缓冲区内的内容
}

void loop() {
}

效果如下:

oled显示动画

显示动画核心就是重复显示几张图片,连起来就是图片了。取模方式同图片显示,这里不做介绍,直接展示代码了。

c 复制代码
/*头文件包含*/
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

/*OLED屏幕的参数像素点配置,*/
#define SCREEN_WIDTH 128  // OLED display width, in pixels
#define SCREEN_HEIGHT 64  // OLED display height, in pixels

/*软件模拟SPI的接口*/
// Declaration for SSD1306 display connected using software SPI (default case):
#define OLED_MOSI 9                                    //数据线
#define OLED_CLK 10                                    //时钟线
#define OLED_DC 11                                     //数据/命令标志(0,命令;1,数据)
#define OLED_CS 12                                     //片选信号
#define OLED_RESET 13                                  //复位信号
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,  //这个是软件SPI的构造函数,创建了一个Adafruit_SSD1306类,类的名字叫做display
                         OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);

/*下面是硬件SPI的接口,如果需要使用硬件SPI,则将下面取消注释,注释上面软件SPI接口即可*/
/* Comment out above, uncomment this block to use hardware SPI
#define OLED_DC     6
#define OLED_CS     7
#define OLED_RESET  8
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT,     //这个是硬件SPI的构造函数,创建了一个Adafruit_SSD1306类,类的名字叫做display
  &SPI, OLED_DC, OLED_RESET, OLED_CS);
*/

/*
下面是一些比较基础的函数
display.clearDisplay();               //清除缓冲区函数,清屏函数
display.display();            //显示当前缓冲区内的内容
display.setTextSize(s);               //设置字体大小,参数S = 1/2/3....
display.setCursor(x,y);               //设置光标位置,参数为坐标
display.setTextColor(value);          //设置字体颜色,默认WHITE
display.steTextWrap();                //设置自动换行,参数为true或者false
display.drawBitmap(x,y,Bitmap,w,h,c); //x,y是图像的坐标,Bitmap为图像数据(可以是数组名,也可以是指针),w,h,为图像的宽和高,c是颜色,

*/
static const unsigned char PROGMEM pic1[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,
0x00,0x00,0x00,0x03,0xFF,0x80,0x00,0x00,0x03,0xC1,0xC0,0x00,0x00,0x01,0x9C,0xE0,
0x00,0x00,0x03,0xFB,0x78,0x00,0x00,0x03,0x6B,0x7E,0x06,0x00,0xFF,0x63,0x7F,0xFE,
0x00,0xFF,0x9C,0x7F,0xFE,0x00,0x3F,0x9C,0xE3,0x80,0x00,0x00,0xE1,0xDD,0x80,0x00,
0x00,0x7F,0xBD,0x80,0x00,0x00,0x3F,0xBD,0x80,0x00,0x00,0x39,0xBD,0x80,0x00,0x00,
0x7F,0xBD,0x80,0x00,0x00,0x6F,0x7D,0x80,0x00,0x00,0x66,0xFD,0x80,0x00,0x00,0x66,
0xFB,0x80,0x00,0x01,0xE6,0xFB,0x00,0x00,0x01,0xC7,0x07,0x00,0x00,0x00,0xC3,0xFE,
0x00,0x00,0x00,0x00,0xFC,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,
0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,
0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,
0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"D:\tools\Arduino\素材\全部GIF图片帧\1.bmp",0*/
};
static const unsigned char PROGMEM pic2[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x01,0x7F,0xC0,0x00,0x00,0x01,0xE1,
0xC0,0x00,0x00,0x00,0xCE,0xE0,0x00,0x00,0x01,0xFF,0x70,0x00,0x00,0x01,0xB5,0xFC,
0x00,0x00,0x01,0xB1,0xEE,0xFF,0x00,0x7F,0xBF,0xFF,0xFF,0x00,0x7F,0xDE,0x7F,0xFE,
0x00,0x00,0xE4,0xE3,0x80,0x00,0x00,0x7F,0xDD,0x80,0x00,0x00,0x3F,0xDD,0x80,0x00,
0x00,0x0F,0xDD,0x80,0x00,0x00,0x71,0xBD,0x80,0x00,0x00,0x7B,0xBD,0x80,0x00,0x00,
0x7F,0x7D,0x80,0x00,0x00,0xEE,0x7D,0x80,0x00,0x00,0xEC,0xFB,0x80,0x00,0x00,0xCD,
0xFB,0x00,0x00,0x00,0xCE,0xF3,0x00,0x00,0x00,0xC7,0x06,0x00,0x00,0x01,0xC3,0xFE,
0x00,0x00,0x01,0x81,0xFC,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x18,0x00,
0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,
0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x00,0x18,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,
0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"D:\tools\Arduino\素材\全部GIF图片帧\2.bmp",0*/
};
static const unsigned char PROGMEM pic3[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xC0,0x00,0x00,0x00,0xDF,0xE0,0x00,0x00,0x00,
0xF8,0x70,0x00,0x00,0x00,0x77,0xB0,0x00,0x00,0x00,0x67,0x38,0x00,0x00,0x00,0x7A,
0xD8,0x00,0x00,0x00,0x7A,0xDC,0x00,0x00,0x00,0x78,0xDC,0x00,0x00,0x00,0x67,0x3E,
0x1F,0x00,0x3F,0xF7,0x3F,0xFF,0x00,0x3F,0xF8,0x7F,0xFE,0x00,0x00,0x1F,0xE3,0x80,
0x00,0x00,0x0F,0xDD,0x80,0x00,0x00,0x00,0xDD,0x80,0x00,0x00,0x01,0xDD,0x80,0x00,
0x00,0x01,0xBD,0x80,0x00,0x00,0x03,0xBD,0x80,0x00,0x00,0xC7,0x7D,0x80,0x00,0x00,
0xFE,0xFD,0x80,0x00,0x00,0xFD,0xFB,0x80,0x00,0x00,0xD9,0xFB,0x00,0x00,0x01,0xCC,
0xFB,0x00,0x00,0x01,0xCE,0x06,0x00,0x00,0x01,0xC7,0xEE,0x00,0x00,0x01,0x81,0xFC,
0x00,0x00,0x03,0x80,0x7C,0x00,0x00,0x03,0x80,0x18,0x00,0x00,0x01,0x80,0x18,0x00,
0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,
0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x00,0x18,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"D:\tools\Arduino\素材\全部GIF图片帧\3.bmp",0*/
};
static const unsigned char PROGMEM pic4[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x02,0xFC,0x00,0x00,0x00,0x03,0xFE,0x00,0x00,0x00,0x03,0x87,0x00,0x00,
0x00,0x07,0x7B,0x80,0x00,0x00,0x06,0xFD,0x80,0x00,0x00,0x07,0xB7,0x80,0x00,0x00,
0x07,0x87,0x80,0x00,0x00,0x06,0x39,0x80,0x00,0x00,0x06,0x3B,0x80,0x00,0x00,0x07,
0x07,0x00,0x00,0x00,0x03,0xFE,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xC0,0x03,0xFF,0xFF,
0xFF,0xC0,0x00,0x00,0xC3,0xFC,0x00,0x00,0x01,0xBB,0x00,0x00,0x00,0x01,0xBB,0x00,
0x00,0x00,0x03,0xBB,0x00,0x00,0x00,0x03,0x7B,0x80,0x00,0x00,0x03,0x7B,0x80,0x00,
0x00,0x06,0x7B,0x00,0x00,0x00,0x06,0xFB,0x00,0x00,0x00,0x0C,0xFB,0x00,0x00,0x00,
0x1D,0xFB,0x00,0x00,0x00,0x3B,0xFB,0x00,0x00,0x00,0x3B,0xF7,0x00,0x00,0x00,0x1C,
0xF6,0x00,0x00,0x00,0x1F,0x06,0x00,0x00,0x00,0x37,0xFE,0x00,0x00,0x00,0x71,0xFC,
0x00,0x00,0x00,0x60,0x7C,0x00,0x00,0x00,0xE0,0x18,0x00,0x00,0x00,0xC0,0x18,0x00,
0x00,0x00,0xC0,0x18,0x00,0x00,0x01,0xC0,0x18,0x00,0x00,0x01,0x80,0x18,0x00,0x00,
0x01,0x80,0x18,0x00,0x00,0x03,0x80,0x18,0x00,0x00,0x03,0x00,0x18,0x00,0x00,0x03,
0x00,0x18,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,
0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"D:\tools\Arduino\素材\全部GIF图片帧\4.bmp",0*/
};
static const unsigned char PROGMEM pic5[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3E,0x00,
0x00,0x00,0x03,0xFF,0x00,0x00,0x00,0x03,0xF3,0x80,0x00,0x00,0x01,0xC1,0xC0,0x00,
0x00,0x03,0x9C,0xC0,0x00,0x00,0x03,0x6B,0xE0,0x00,0x00,0x03,0x63,0x60,0x00,0x00,
0x03,0x7F,0xE0,0x00,0x00,0x03,0x1C,0xE0,0x00,0x00,0x03,0xBC,0xC0,0x00,0x00,0x01,
0xC1,0xC0,0x00,0x01,0x80,0xFF,0x80,0x00,0x01,0xFF,0xFF,0xFF,0xC0,0x01,0xFF,0xDF,
0xFF,0xC0,0x00,0x00,0xC3,0x00,0x00,0x00,0x01,0xD3,0x00,0x00,0x00,0x01,0xB7,0x00,
0x00,0x00,0x03,0xB7,0x00,0x00,0x00,0x03,0x77,0x00,0x00,0x00,0x07,0x76,0x00,0x00,
0x00,0x06,0xF6,0x00,0x00,0x00,0x06,0xF6,0x00,0x00,0x00,0x0C,0xF6,0x00,0x00,0x00,
0x0D,0xF6,0x00,0x00,0x00,0x1D,0xF6,0x00,0x00,0x00,0x1B,0xF6,0x00,0x00,0x00,0x1C,
0xF6,0x00,0x00,0x00,0x1F,0x16,0x00,0x00,0x00,0x1F,0xE6,0x00,0x00,0x00,0x19,0xFE,
0x00,0x00,0x00,0x38,0x7E,0x00,0x00,0x00,0x30,0x18,0x00,0x00,0x00,0x30,0x18,0x00,
0x00,0x00,0x70,0x18,0x00,0x00,0x00,0x60,0x18,0x00,0x00,0x00,0x60,0x18,0x00,0x00,
0x00,0xE0,0x18,0x00,0x00,0x00,0xC0,0x18,0x00,0x00,0x00,0xC0,0x18,0x00,0x00,0x01,
0xC0,0x18,0x00,0x00,0x03,0x80,0x38,0x00,0x00,0x03,0x80,0x38,0x00,0x00,0x00,0x00,
0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"D:\tools\Arduino\素材\全部GIF图片帧\5.bmp",0*/
};
static const unsigned char PROGMEM pic6[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x1E,0x00,0x00,0x00,0x03,0xFF,0x80,0x00,0x00,0x03,0xF3,0xC0,0x00,
0x00,0x01,0xC4,0xC0,0x00,0x00,0x01,0x9E,0xE0,0x00,0x00,0x01,0xED,0xE0,0x00,0x00,
0x03,0xE1,0xE0,0x00,0x00,0x03,0x9F,0x60,0x00,0x00,0x03,0x9E,0xE0,0x00,0x00,0x01,
0xC0,0xC0,0x00,0x00,0x00,0xE3,0xC0,0x00,0x01,0xFF,0x7F,0x00,0x40,0x01,0xFF,0xFF,
0xFF,0xC0,0x00,0x7F,0xC3,0xFF,0xC0,0x00,0x00,0xDB,0x00,0x00,0x00,0x01,0x9B,0x00,
0x00,0x00,0x01,0xBB,0x00,0x00,0x00,0x03,0x3B,0x00,0x00,0x00,0x03,0x7B,0x00,0x00,
0x00,0x07,0x73,0x00,0x00,0x00,0x06,0xF7,0x00,0x00,0x00,0x0E,0xF7,0x00,0x00,0x00,
0x0D,0xF7,0x00,0x00,0x00,0x1D,0xF6,0x00,0x00,0x00,0x1B,0xF6,0x00,0x00,0x00,0x19,
0xF6,0x00,0x00,0x00,0x1E,0x36,0x00,0x00,0x00,0x1F,0xC6,0x00,0x00,0x00,0x1B,0xFE,
0x00,0x00,0x00,0x38,0x7E,0x00,0x00,0x00,0x30,0x18,0x00,0x00,0x00,0x70,0x18,0x00,
0x00,0x00,0x60,0x18,0x00,0x00,0x00,0x60,0x18,0x00,0x00,0x00,0xE0,0x18,0x00,0x00,
0x00,0xC0,0x18,0x00,0x00,0x00,0xC0,0x18,0x00,0x00,0x01,0xC0,0x18,0x00,0x00,0x01,
0x80,0x38,0x00,0x00,0x03,0x80,0x38,0x00,0x00,0x03,0x80,0x38,0x00,0x00,0x00,0x00,
0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"D:\tools\Arduino\素材\全部GIF图片帧\6.bmp",0*/
};
static const unsigned char PROGMEM pic7[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,0x00,
0x00,0x0D,0xFC,0x00,0x00,0x00,0x0F,0xFE,0x00,0x00,0x00,0x06,0x06,0x00,0x00,0x00,
0x0E,0xF3,0x00,0x00,0x00,0x0F,0xFB,0x00,0x00,0x00,0x0F,0x5F,0x00,0x00,0x00,0x0F,
0x1F,0x00,0x00,0x00,0x0D,0xEB,0x00,0x00,0x00,0x0C,0xE3,0x00,0x00,0x06,0x07,0x06,
0x00,0x80,0x07,0xFF,0xFF,0xFF,0xC0,0x07,0xFF,0xFF,0xFF,0xC0,0x00,0x00,0xC3,0x00,
0x00,0x00,0x01,0x9B,0x00,0x00,0x00,0x01,0xBB,0x00,0x00,0x00,0x03,0xBB,0x00,0x00,
0x00,0x03,0x7B,0x80,0x00,0x00,0x03,0x7B,0x80,0x00,0x00,0x06,0xFB,0x80,0x00,0x00,
0x0E,0xFB,0x00,0x00,0x00,0x1D,0xFB,0x00,0x00,0x00,0x1B,0xFB,0x00,0x00,0x00,0x3D,
0xFB,0x00,0x00,0x01,0xFE,0x37,0x00,0x00,0x01,0xE7,0x86,0x00,0x00,0x03,0x83,0xFE,
0x00,0x00,0x03,0x80,0xFC,0x00,0x00,0x03,0x80,0x18,0x00,0x00,0x03,0x80,0x18,0x00,
0x00,0x03,0x80,0x18,0x00,0x00,0x03,0x00,0x18,0x00,0x00,0x03,0x00,0x18,0x00,0x00,
0x03,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x00,0x18,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,
0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"D:\tools\Arduino\素材\全部GIF图片帧\7.bmp",0*/
};
static const unsigned char PROGMEM pic8[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x0F,0xC0,0x00,0x00,0x00,0xDF,0xE0,0x00,0x00,0x00,0xF8,0x70,0x00,0x00,0x00,0x67,
0xB8,0x00,0x00,0x00,0x7F,0xD8,0x00,0x00,0x00,0x7A,0xD8,0x00,0x00,0x00,0x78,0xDC,
0x00,0x00,0x00,0x7F,0xDE,0x00,0x00,0x3F,0xE7,0x3F,0xFF,0x00,0x3F,0xF8,0x7F,0xFF,
0x00,0x00,0x3F,0xE3,0x00,0x00,0x00,0x0F,0xDD,0x80,0x00,0x00,0x00,0xDD,0x80,0x00,
0x00,0x01,0xDD,0x80,0x00,0x00,0x01,0xBD,0x80,0x00,0x00,0x03,0xBD,0x80,0x00,0x00,
0xC7,0x7D,0x80,0x00,0x00,0xFE,0xFD,0x80,0x00,0x00,0xFD,0xFB,0x80,0x00,0x00,0xDD,
0xFB,0x00,0x00,0x01,0xCC,0xFB,0x00,0x00,0x01,0xC7,0x06,0x00,0x00,0x01,0xC3,0xFE,
0x00,0x00,0x01,0x81,0xFC,0x00,0x00,0x03,0x80,0x18,0x00,0x00,0x03,0x80,0x18,0x00,
0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,
0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x00,0x18,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,
0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"D:\tools\Arduino\素材\全部GIF图片帧\8.bmp",0*/
};
static const unsigned char PROGMEM pic9[] = {

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x03,0x7F,
0x80,0x00,0x00,0x03,0xE1,0xC0,0x00,0x00,0x00,0xCE,0xE0,0x00,0x00,0x01,0xFF,0x78,
0x00,0x00,0x01,0xB5,0xFC,0x00,0x00,0x01,0xB1,0xEF,0xFF,0x00,0x7F,0xBF,0xFF,0xFF,
0x00,0x7F,0xDE,0x7F,0xF0,0x00,0x00,0xE0,0xE3,0x80,0x00,0x00,0x7F,0xDD,0x80,0x00,
0x00,0x3F,0xDD,0x80,0x00,0x00,0x61,0x9D,0x80,0x00,0x00,0x71,0xBD,0x80,0x00,0x00,
0x7B,0xBD,0x80,0x00,0x00,0x7F,0x7D,0x80,0x00,0x00,0xEE,0xFD,0x80,0x00,0x00,0xCD,
0xFB,0x80,0x00,0x00,0xCC,0xFB,0x00,0x00,0x00,0xC6,0x37,0x00,0x00,0x01,0xC7,0xCE,
0x00,0x00,0x01,0x83,0xFC,0x00,0x00,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x18,0x00,
0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,
0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
0x00,0x18,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,
0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"D:\tools\Arduino\素材\全部GIF图片帧\9.bmp",0*/
};



// static const unsigned char* PROGMEM Chinese[7] =
// {
// BU,Xiang,Xie,Dai,Ma,De,Wo
// }
void setup() {
  Serial.begin(9600);

  // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally
  //display.begin这个函数还有其他的参数,但是这里是C++的语法,提供的库函数里面有默认参数,所以可以不用填。默认即可。
  if (!display.begin(SSD1306_SWITCHCAPVCC)) {
    Serial.println(F("SSD1306 allocation failed"));
    for (;;)
      ;  // Don't proceed, loop forever
  }
  display.clearDisplay();   //清除缓存
  display.setTextColor(1);  //设置字体颜色,对于oled来说,写1是有颜色,0是没颜色
  display.setTextSize(2);   //设置字体大小,默认是1,写入2就是放大1呗,以此类推
  display.setCursor(0, 0);  //设置光标位置,后面填写地址,都是相对于光标的偏移量
}

void loop() {
  display.clearDisplay();   //清除缓存
  display.drawBitmap(0,0,pic1,34,64,1);     //显示动画第1帧
  display.display();        //显示当前缓冲区内的内容
  delay(20);

  display.clearDisplay();   //清除缓存
  display.drawBitmap(0,0,pic2,34,64,1);     //显示动画第2帧
  display.display();        //显示当前缓冲区内的内容
  delay(20);

  display.clearDisplay();   //清除缓存
  display.drawBitmap(0,0,pic3,34,64,1);     //显示动画第3帧
  display.display();        //显示当前缓冲区内的内容
  delay(20);

  display.clearDisplay();   //清除缓存
  display.drawBitmap(0,0,pic4,34,64,1);     //显示动画第4帧
  display.display();        //显示当前缓冲区内的内容
  delay(20);

  display.clearDisplay();   //清除缓存
  display.drawBitmap(0,0,pic5,34,64,1);     //显示动画第5帧
  display.display();        //显示当前缓冲区内的内容
  delay(20);

  display.clearDisplay();   //清除缓存
  display.drawBitmap(0,0,pic5,34,64,1);     //显示动画第6帧
  display.display();        //显示当前缓冲区内的内容
  delay(20);

  display.clearDisplay();   //清除缓存
  display.drawBitmap(0,0,pic7,34,64,1);     //显示动画第7帧
  display.display();        //显示当前缓冲区内的内容
  delay(20);

  display.clearDisplay();   //清除缓存
  display.drawBitmap(0,0,pic8,34,64,1);     //显示动画第8帧
  display.display();        //显示当前缓冲区内的内容
  delay(20);

  display.clearDisplay();   //清除缓存
  display.drawBitmap(0,0,pic9,34,64,1);     //显示动画第9帧
  display.display();        //显示当前缓冲区内的内容
  delay(20);
}

演示效果如下:

oled显示动画

最后,推荐一个gif图片拆分成多帧图片的网站:UU在线工具

相关推荐
秃头佛爷1 小时前
Python学习大纲总结及注意事项
开发语言·python·学习
dayouziei3 小时前
java的类加载机制的学习
java·学习
hairenjing11236 小时前
使用 Mac 数据恢复从 iPhoto 图库中恢复照片
windows·stm32·嵌入式硬件·macos·word
dsywws7 小时前
Linux学习笔记之vim入门
linux·笔记·学习
模拟IC攻城狮7 小时前
华为海思招聘-芯片与器件设计工程师-模拟芯片方向- 机试题-真题套题题目——共8套(每套四十题)
嵌入式硬件·华为·硬件架构·芯片
IT B业生8 小时前
51单片机教程(六)- LED流水灯
单片机·嵌入式硬件·51单片机
晨曦_子画8 小时前
3种最难学习和最容易学习的 3 种编程语言
学习
一枝小雨8 小时前
51单片机学习心得2(基于STC89C52):串口通信(UART)
单片机·嵌入式硬件·51单片机
城南vision8 小时前
Docker学习—Docker核心概念总结
java·学习·docker
ctrey_9 小时前
2024-11-1 学习人工智能的Day20 openCV(2)
人工智能·opencv·学习