找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2258|回复: 1
收起左侧

基于arduino uno 与esp8266 的物联控制

[复制链接]
ID:382510 发表于 2018-8-3 13:31 | 显示全部楼层 |阅读模式
先贴程序#include <Adafruit_GFX.h>
#include <MCUFRIEND_kbv.h>
MCUFRIEND_kbv tft;
#define BLACK   0x0000
#define BLUE    0x001F
#define RED     0xF800
#define GREEN   0x07E0
#define CYAN    0x07FF
#define MAGENTA 0xF81F
#define YELLOW  0xFFE0
#define WHITE   0xFFFF
char m1;
const unsigned char PROGMEM bk[] = {      //32*40欢迎使用贝壳物联 8
/*--  文字:  欢  --*/
/*--  楷体24;  此字体下对应的点阵为:宽x高=32x33   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=32x40  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x80,0xF8,0xF8,0xF8,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x08,0x08,0x88,0x88,0x88,0x0C,0x8C,0xFC,0xFC,0xFC,0x1C,0xC0,0xF0,0x7C,
0xBF,0x9F,0x9F,0x98,0x08,0x4C,0x7C,0x7C,0x3C,0x1C,0x18,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x80,0xC1,0xF3,0xFF,0x3F,0x3F,0xFF,0xF0,0xE0,0x00,0x00,0xE0,
0xFF,0xFF,0x3F,0xFB,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x04,0x07,0x03,0x03,0x01,0x00,0x00,0x00,0x10,0x18,0x0C,0x0E,0x07,0x03,
0x01,0x00,0x00,0x00,0x01,0x07,0x0F,0x1F,0x1E,0x1C,0x1C,0x18,0x18,0x10,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,

/*--  文字:  迎  --*/
/*--  楷体24;  此字体下对应的点阵为:宽x高=32x33   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=32x40  --*/
0x00,0x00,0x00,0x00,0x00,0x40,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x80,
0xF0,0xF0,0x70,0x70,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0xC0,0xC0,0xE0,0xE1,0xE1,0x61,0x00,0x06,0x1E,0xFE,0xFF,0x81,
0x81,0xC0,0x46,0xFE,0xFE,0xFE,0x82,0x83,0xFF,0xFF,0xFF,0x07,0x00,0x00,0x00,0x00,
0x00,0x80,0x80,0x80,0xC0,0xC0,0xCF,0x7F,0xFF,0xF8,0x80,0x80,0x1F,0x1F,0x1F,0x07,
0x03,0x00,0xF0,0xFF,0xFF,0x3F,0x01,0x03,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x03,0x03,0x06,
0x06,0x0E,0x0E,0x1D,0x1D,0x1C,0x1C,0x1C,0x1C,0x1C,0x0C,0x0C,0x0C,0x04,0x04,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  使  --*/
/*--  楷体24;  此字体下对应的点阵为:宽x高=32x33   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=32x40  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0xE0,0xC0,0x40,0x00,0x00,0x00,
0x00,0x70,0xF0,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xC0,0xE0,0xF8,0xFE,0xDF,0xCF,0x03,0x00,0xC4,0xC4,0xC4,0xC4,
0x64,0xE6,0xFF,0xFF,0x3F,0x32,0x13,0xF3,0xF3,0xF3,0x72,0x20,0x00,0x00,0x00,0x00,
0x00,0x08,0x0E,0x07,0x03,0x01,0x00,0xFF,0xFF,0xFF,0x00,0x10,0x18,0x1B,0x37,0x77,
0xE6,0xFF,0xFF,0xFF,0x82,0x02,0x02,0x03,0x03,0x02,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x3F,0x3F,0x07,0x18,0x18,0x0C,0x0C,0x0E,0x07,
0x03,0x03,0x01,0x03,0x07,0x07,0x0E,0x1E,0x1C,0x1C,0x1C,0x18,0x08,0x08,0x08,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  用  --*/
/*--  楷体24;  此字体下对应的点阵为:宽x高=32x33   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=32x40  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xC0,0xC0,0xC0,0x40,0x40,0x40,0xC0,0xC0,
0xC0,0xE0,0x20,0x20,0x20,0x30,0xF0,0xF0,0xE0,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x20,0x20,0x20,0x31,0xFF,
0xFF,0xFF,0x10,0x10,0x10,0x00,0x00,0xFF,0xFF,0xFF,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xFF,0xFF,0x1F,0x0C,0x04,0x04,0xFC,0xFF,
0xFF,0x7F,0x06,0x02,0x02,0x02,0x00,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x30,0x38,0x1F,0x0F,0x07,0x01,0x00,0x00,0x00,0x00,0x03,0x0F,
0x0F,0x00,0x00,0x00,0x04,0x04,0x1C,0x3F,0x3F,0x3F,0x0F,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  贝  --*/
/*--  楷体24;  此字体下对应的点阵为:宽x高=32x33   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=32x40  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xC0,0xC0,0xC0,0x40,0x40,0x60,0x60,
0x20,0x20,0x30,0x30,0xF0,0xF0,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0xFC,0xFC,
0xFC,0x1C,0x00,0x00,0x07,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x1F,0x1F,0x9F,0xE0,0xFC,0xFF,0x3F,
0x47,0xC0,0xC0,0x80,0x9C,0x3F,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x20,0x30,0x30,0x18,0x1C,0x0E,0x07,0x07,0x03,0x00,0x00,
0x00,0x00,0x03,0x07,0x0F,0x1F,0x3E,0x3E,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,

/*--  文字:  壳  --*/
/*--  楷体24;  此字体下对应的点阵为:宽x高=32x33   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=32x40  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0xFC,0xFC,
0xFC,0xFC,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x01,0x91,0x91,0x91,0x99,0x99,0x9F,0x9F,
0x9F,0xC8,0xCC,0x4C,0x4C,0x48,0x40,0xE0,0xE0,0xE0,0xC0,0xC0,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x38,0x3E,0x3F,0x1F,0x03,0x01,0x01,0xFD,0xFC,0xF8,0x38,0x08,0x0C,
0xFC,0xFC,0x7C,0x0C,0x00,0x00,0x06,0x07,0x03,0x03,0x01,0x01,0x01,0x00,0x00,0x00,
0x00,0x00,0x00,0x40,0x60,0x60,0x30,0x30,0x18,0x1E,0x0F,0x0F,0x03,0x00,0x00,0x00,
0x0F,0x1F,0x3C,0x38,0x30,0x30,0x30,0x30,0x30,0x3C,0x3F,0x3F,0x18,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  物  --*/
/*--  楷体24;  此字体下对应的点阵为:宽x高=32x33   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=32x40  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0xF8,0x70,0x00,0x00,0x00,
0x00,0x00,0xF0,0xF0,0xF0,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x80,0xC0,0xE0,0x7C,0x3E,0x3E,0x2E,0xFF,0xFF,0xFF,0x10,0x10,0xC0,0xE0,
0x78,0xFF,0xDF,0xC7,0x61,0xE0,0xE0,0xE0,0xB0,0x30,0xF0,0xF0,0xF0,0x60,0x20,0x00,
0x00,0x40,0xC1,0xE1,0xE0,0x70,0x30,0x38,0x1C,0xFF,0xFF,0xFF,0x23,0x31,0x19,0x8E,
0xCF,0xE7,0x73,0x3D,0x9F,0x8F,0x07,0x01,0xC0,0xFC,0xFF,0xFF,0x0F,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x1F,0x1F,0x04,0x06,0x03,0x03,
0x01,0x00,0x00,0x00,0x01,0x03,0x0F,0x0F,0x0F,0x07,0x03,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  联  --*/
/*--  楷体24;  此字体下对应的点阵为:宽x高=32x33   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=32x40  --*/
0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0xC0,0xC0,0xC0,0xC0,0xC0,0x40,
0xC0,0xC0,0xC0,0x80,0x00,0x00,0x80,0xF0,0xF0,0x70,0x30,0x20,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x01,0x01,0xFF,0xFF,0xFF,0x11,0x11,0xFF,0xFF,0xFF,0x00,0x00,0x20,
0x30,0x31,0x73,0xF3,0xF1,0xDA,0x1B,0x1B,0x19,0x08,0x08,0x00,0x00,0x00,0x00,0x00,
0x00,0xC0,0xC0,0xC0,0xC0,0x7F,0x7F,0x7F,0x31,0x31,0xFF,0xFF,0xFF,0x08,0x0C,0x04,
0x84,0xC4,0xFE,0xFF,0x3F,0x7F,0xF2,0xE2,0xC2,0x83,0x03,0x03,0x03,0x02,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x3F,0x3F,0x1F,0x0C,0x06,0x07,
0x03,0x03,0x01,0x00,0x00,0x00,0x01,0x03,0x07,0x07,0x07,0x06,0x06,0x04,0x0C,0x08,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,


};
const unsigned char PROGMEM lj[] = { //20*24 6
/*--  文字:  连  --*/
/*--  楷体16;  此字体下对应的点阵为:宽x高=22x21   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=22x24  --*/
0x00,0x00,0x00,0x10,0x30,0x30,0x30,0x20,0x20,0xE0,0xFE,0xFE,0xDE,0xD4,0x10,0x10,
0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x16,0xFE,0xFE,0x96,0x12,0x13,0x13,
0x13,0x7F,0xFF,0xFF,0x09,0x09,0x09,0x08,0x08,0x08,0x00,0x00,0x00,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x03,0x03,0x02,0x06,0x06,0x06,0x06,0x06,0x06,0x02,0x02,
0x02,0x00,

/*--  文字:  接  --*/
/*--  楷体16;  此字体下对应的点阵为:宽x高=22x21   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=22x24  --*/
0x00,0x00,0x00,0x80,0x82,0xFE,0xFE,0xCC,0x40,0x40,0xC0,0xC4,0x4C,0xEC,0xEC,0xE0,
0x20,0x20,0x00,0x00,0x00,0x00,0x20,0x60,0x71,0x31,0x18,0xFF,0xFF,0x26,0x2E,0x6C,
0x65,0xFD,0xBD,0xFF,0xF7,0x77,0x12,0x12,0x12,0x10,0x10,0x00,0x00,0x00,0x00,0x01,
0x03,0x07,0x07,0x00,0x04,0x04,0x06,0x07,0x03,0x01,0x01,0x03,0x07,0x06,0x06,0x00,
0x00,0x00,

/*--  文字:  中  --*/
/*--  楷体16;  此字体下对应的点阵为:宽x高=22x21   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=22x24  --*/
0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0x42,0xFE,0xFE,0xFC,0x40,0x60,0xE0,0xE0,
0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x1F,0x1E,0x08,0x08,0xFF,
0xFF,0xFF,0x04,0x04,0x07,0x07,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x0F,0x0F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,

/*--  文字:  。  --*/
/*--  楷体16;  此字体下对应的点阵为:宽x高=22x21   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=22x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x60,0x60,0xE0,0xC0,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,
0x03,0x02,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,

/*--  文字:  。  --*/
/*--  楷体16;  此字体下对应的点阵为:宽x高=22x21   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=22x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x60,0x60,0xE0,0xC0,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,
0x03,0x02,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,

/*--  文字:  。  --*/
/*--  楷体16;  此字体下对应的点阵为:宽x高=22x21   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=22x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x60,0x60,0xE0,0xC0,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,
0x03,0x02,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,
};
const unsigned char PROGMEM cg[] = { //20*24 6
/*--  文字:  连  --*/
/*--  楷体16;  此字体下对应的点阵为:宽x高=22x21   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=22x24  --*/
0x00,0x00,0x00,0x10,0x30,0x30,0x30,0x20,0x20,0xE0,0xFE,0xFE,0xDE,0xD4,0x10,0x10,
0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x16,0xFE,0xFE,0x96,0x12,0x13,0x13,
0x13,0x7F,0xFF,0xFF,0x09,0x09,0x09,0x08,0x08,0x08,0x00,0x00,0x00,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x03,0x03,0x02,0x06,0x06,0x06,0x06,0x06,0x06,0x02,0x02,
0x02,0x00,

/*--  文字:  接  --*/
/*--  楷体16;  此字体下对应的点阵为:宽x高=22x21   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=22x24  --*/
0x00,0x00,0x00,0x80,0x82,0xFE,0xFE,0xCC,0x40,0x40,0xC0,0xC4,0x4C,0xEC,0xEC,0xE0,
0x20,0x20,0x00,0x00,0x00,0x00,0x20,0x60,0x71,0x31,0x18,0xFF,0xFF,0x26,0x2E,0x6C,
0x65,0xFD,0xBD,0xFF,0xF7,0x77,0x12,0x12,0x12,0x10,0x10,0x00,0x00,0x00,0x00,0x01,
0x03,0x07,0x07,0x00,0x04,0x04,0x06,0x07,0x03,0x01,0x01,0x03,0x07,0x06,0x06,0x00,
0x00,0x00,

/*--  文字:  成  --*/
/*--  楷体16;  此字体下对应的点阵为:宽x高=22x21   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=22x24  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x86,0xFE,0xFE,0xF0,0x44,0x4C,0x4C,0x08,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC1,0xFF,0xFF,0x11,0x99,0xF8,0xF8,
0x39,0x8F,0xFF,0xF8,0xFE,0xDE,0x06,0x00,0x80,0x80,0x00,0x00,0x00,0x06,0x07,0x03,
0x01,0x00,0x01,0x03,0x03,0x01,0x01,0x01,0x00,0x00,0x01,0x03,0x07,0x06,0x0F,0x0F,
0x00,0x00,

/*--  文字:  功  --*/
/*--  楷体16;  此字体下对应的点阵为:宽x高=22x21   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=22x24  --*/
0x00,0x00,0x80,0x80,0xC0,0xC0,0xC0,0xE0,0x60,0x60,0x00,0x00,0xC4,0xFC,0xFC,0x88,
0xC0,0xC0,0x80,0x80,0x00,0x00,0x00,0x20,0x60,0x60,0x30,0x3F,0x1F,0x1F,0x88,0xC9,
0xF9,0x7D,0x9F,0x8F,0x01,0xE0,0xFF,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x04,0x06,0x03,0x03,0x01,0x00,0x00,0x01,0x07,0x07,0x03,0x01,0x00,0x00,0x00,
0x00,0x00,
};
const unsigned char PROGMEM zl[] = {
  /*--  文字:  准  --*/
/*--  宋体14;  此字体下对应的点阵为:宽x高=19x19   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=19x24  --*/
0x00,0x04,0x1C,0x9C,0xF8,0xF8,0xF8,0xFC,0xFE,0xFE,0x12,0xF2,0xFE,0xFE,0x94,0x98,
0x98,0x10,0x00,0x08,0xCC,0xFC,0xFF,0x07,0x03,0x01,0xFF,0xFF,0xFF,0x11,0xFF,0xFF,
0xFF,0x11,0x99,0x99,0x99,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,

/*--  文字:  备  --*/
/*--  宋体14;  此字体下对应的点阵为:宽x高=19x19   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=19x24  --*/
0x00,0x00,0x80,0xE0,0x70,0x3C,0x1F,0x3F,0xFA,0xC8,0xE8,0x78,0x3C,0x1C,0x0C,0x00,
0x00,0x00,0x00,0x08,0x08,0x08,0x0C,0xFC,0xFE,0xFE,0x27,0x25,0xFD,0xFD,0x27,0x27,
0xFE,0xFE,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x01,0x01,0x01,0x01,
0x01,0x01,0x01,0x03,0x03,0x00,0x00,0x00,0x00,

/*--  文字:  接  --*/
/*--  宋体14;  此字体下对应的点阵为:宽x高=19x19   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=19x24  --*/
0x20,0x20,0x20,0xFF,0xFF,0xFE,0xB0,0xB8,0xB8,0xF8,0xFA,0xEE,0xCE,0xF8,0xB8,0xB8,
0xC8,0xC8,0x00,0x04,0x0C,0x0C,0xFF,0xFF,0xFF,0x0B,0x28,0x38,0x7E,0xDF,0xCF,0xE9,
0xF8,0xB8,0x88,0x8C,0x0C,0x00,0x00,0x01,0x01,0x03,0x03,0x03,0x02,0x02,0x03,0x03,
0x01,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x00,

/*--  文字:  受  --*/
/*--  宋体14;  此字体下对应的点阵为:宽x高=19x19   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=19x24  --*/
0x00,0x00,0xC8,0xC8,0xFC,0xF4,0xE4,0x8C,0xFC,0xF4,0xA4,0xC6,0xF6,0xBA,0x9A,0xDE,
0xC0,0xC0,0x00,0x00,0x03,0x03,0x05,0x04,0x04,0x8C,0xFC,0xF4,0x64,0xF4,0xBC,0x9E,
0x86,0x06,0x03,0x01,0x00,0x00,0x02,0x02,0x02,0x02,0x03,0x01,0x01,0x00,0x00,0x00,
0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x00,

/*--  文字:  指  --*/
/*--  宋体14;  此字体下对应的点阵为:宽x高=19x19   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=19x24  --*/
0x20,0x20,0x20,0x21,0xFF,0xFE,0x32,0xB0,0xFE,0xFE,0xFE,0x90,0x98,0x8C,0x8C,0xCC,
0xFC,0xF0,0x00,0x08,0x0C,0x0C,0x06,0xFF,0xFF,0x03,0x01,0xFE,0xFE,0xFC,0x24,0x24,
0x24,0xFC,0xFE,0xFE,0x00,0x00,0x00,0x01,0x01,0x03,0x03,0x01,0x00,0x00,0x03,0x03,
0x01,0x01,0x01,0x01,0x03,0x03,0x01,0x00,0x00,

/*--  文字:  令  --*/
/*--  宋体14;  此字体下对应的点阵为:宽x高=19x19   --*/
/*--  高度不是8的倍数,现调整为:宽度x高度=19x24  --*/
0x00,0x00,0x00,0x00,0x80,0xE0,0x70,0x7C,0xDF,0xCF,0x9E,0x38,0x70,0xE0,0xC0,0x80,
0x00,0x00,0x00,0x04,0x06,0x07,0x07,0x05,0x24,0x64,0x44,0xC4,0xC7,0xE7,0xF5,0x1C,
0x0E,0x07,0x07,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,


};



void setup()
{
  Serial.begin(9600);
    tft.reset();
    uint16_t id = tft.readID();
    tft.begin(id);
    tft.setRotation(1);   
    tft.fillScreen(WHITE);
    tft.setTextSize(1);  
    tft.setTextColor(BLUE);
     tft.setCursor(30,90);
    tft.setFont(bk,32,40,'0');
    tft.println("01234567");
    tft.resetFont();
    delay(2000);
    tft.fillScreen(BLACK);
    tft.setCursor(0,0);
     tft.setTextColor(WHITE);
    tft.setFont(lj,22,24,'0');
    tft.println("012345");
    tft.resetFont();
    delay(2000);
while(Serial.available() == 0)
{
}
delay(30000);//30000MS
tft.setCursor(0,0);
tft.fillScreen(BLACK);
tft.setTextColor(WHITE);
tft.setFont(cg,22,24,'0');
tft.println("0123");
tft.resetFont();
delay(2000);
tft.setCursor(0,0);
tft.fillScreen(BLACK);
tft.setTextColor(WHITE);
tft.setTextSize(1);  
tft.setFont(zl,19,24,'0');
tft.println("012345");
tft.resetFont();
delay(1000);
}

void loop()
{
tft.setTextColor(MAGENTA);
m1=Serial.read();
tft.setTextSize(3);  
tft.setCursor(0,0);
switch(m1)
{
  case '9':tft.fillScreen(WHITE);tft.println("play");break;
  case '8':tft.fillScreen(WHITE);tft.println("ok");break;
  case '7':tft.fillScreen(WHITE);tft.println("goodbye");break;
  case '6':tft.fillScreen(WHITE);tft.println("hello");break;
  case '4':tft.fillScreen(WHITE);tft.println("on");break;
  default:delay(2);
}
}


回复

使用道具 举报

ID:1 发表于 2018-8-3 16:20 | 显示全部楼层
楼主能补全一下资料吗?图 工程包等
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表