综合案例-oled屏幕显示gps数据
最新案例教程点击下方链接跳转,CSDN已停止更新
点
击
跳
转
1.案例说明
- 本案例使用gps模块获取gps数据,同时将数据显示在oled屏幕上。
- gps模块每一秒会通过串口发送数据包,通过haas506上的串口接收并处理该数据,获得经纬度、UTC时间等信息。
- 硬件模块
gps模块:HT1818Z3G5L模块
oled模块:尺寸为128x64
2.获取gps模块数据说明
串口接收到的数据,若是完整的包如下所示:
bytearray(b'
$GNGGA,052538.119,,,,,0,00,25.5,,,,,,*7A\r\n
$GNGLL,,,,,052538.119,V,N*64\r\n
$GNGSA,A,1,,,,,,,,,,,,,25.5,25.5,25.5,1*01\r\n
$GNGSA,A,1,,,,,,,,,,,,,25.5,25.5,25.5,4*04\r\n
$GPGSV,3,1,09,07,,,23,08,,,31,10,,,20,14,,,21,0*67\r\n
$GPGSV,3,2,09,21,,,25,27,,,26,30,,,24,34,,,24,0*6C\r\n
$GPGSV,3,3,09,35,,,24,0*6C\r\n
$BDGSV,1,1,00,0*74\r\n
$GNRMC,075622.000,A,3116.56922,N,12044.12475,E,0.00,0.00,020422,,,A,V*01\r\n
$GNVTG,,,,,,,,,N*2E\r\n
$GNZDA,052538.119,,,,,*48\r\n
$GPTXT,01,01,01,ANTENNA OPEN*25\r\n')
有时无法获得完整的数据包,所以在代码中针对该情况修改了一下代码,即判断$GNRMC是否存在,
若存在就将$GNRMC所在的一行数据去除","变为列表。变为列表后,判断该列表的长度是否为14,
若数据完整,则从该列表中取出经纬度、utc时间等信息。
----------------------------------------------------------------------
#gps相关信息可以从$GNRMC中获取,例如:
$GNRMC,075622.000,A,3116.56922,N,12044.12475,E,0.00,0.00,020422,,,A,V*01
# 字段0---语句的id:$GPRMC :,推荐最小定位信息
# 字段1---UTC时间: 格式为hhmmss.ssss(时分秒.毫秒)
# 字段2---状态:A=定位 ,V=未定位
# 字段3---纬度: 格式ddmm.mmmmm若前导数不足,则用0填充
# 字段4---纬度: N(北纬)/S(南纬)
# 字段5---经度 :格式dddmm.mmmmm 若前导数不足,则用0填充
# 字段6---经度: E(东经)/W(西经)
# 字段7---速度,节,knots 1.852KM/h
# 字段8---方位角,度 (二位方向,等效于二位罗盘)
# 字段9---UTC日期,DDMMYY格式(天月年)
# 字段10---磁偏角(000-180)度 若前导数不足,则用0填充
# 字段11---磁偏角方向 E=东,W=西
# 字段12---模式:A=自动,D=差分,E=估计,AND=无效数据
# 字段13---校验值 ,"*"是校验和识别符,后面的两位数为校验和
# 十进制北纬度数 = dd + mm.mmmmm/60;
# 十进制南纬度数 = -(dd + mm.mmmmm/60);
# 十进制东经度数 = ddd + mm.mmmmm/60;
# 十进制西经度数 = -(ddd + mm.mmmmm/60);
3测试接线图
注意:
- 由于haas506只有一个TTL串口,而TTL又被作为下载口和默认的repl口,在board.json中需要重定向repl口。
- 下载程序时TTL口连接电脑;下载完成后TTL口连接gps模块,RS232连接电脑查看输出日志(本案例将repl口重定向到RS232)。
4.测试代码
- main.py
from driver import UART
import utime as time
from ssd1306 import SSD1306_128_64
#数据显示
def disInfo(msg1,msg2):
#显示字符串 6*8(宽x高)点阵
#两行数据,分别为latitude,longitude
disp.oled_showStr(0,0,msg1,1)
disp.oled_showStr(0,1,msg2,1)
#时间
def utcDateTime(dateStr, timeStr, timeZone=8):
if dateStr == '' or timeStr == '':
return None
day = dateStr[0:2]
month = dateStr[2:4]
year = dateStr[4:6]
hr = int(timeStr[0:2])+timeZone
if hr>=24:
hr=str(hr-24)
else:
hr=str(hr)
min = timeStr[2:4]
sec = timeStr[4:6]
t ="20"+year+"-"+month+"-"+day+" "+hr+":"+min+":"+sec
return t
#纬度
def latitude(d,h):
if d=="":
return 0
hemi="" if h=="N" else "-"
#度
deg=int(d[0:2])
#分
min=str(float(d[2:])/60)[1:]
return hemi +str(deg)+min
#经度
def longitude(d,h):
if d=="":
return 0
hemi="" if h=="E" else "-"
#度
deg=int(d[0:3])
#分
min=str(float(d[3:])/60)[1:]
return hemi +str(deg)+min
def main():
while True:
#串口读
size=gps_module.read(readBuf)
data=readBuf
#将字节数据转化成字符串数据
data_str=data.decode()
# 判断是否有数据 且数据中是否包含"$GNRMC"
if size!=0 and "$GNRMC" in data_str and "$GNVTG" in data_str:
print(readBuf)
print("------------0-----------------------")
#删除"\r\n"后,字符串变为列表
data_list=data_str.split('\r\n')
print(data_list)
print("------------------1------------------")
for i in range(len(data_list)):
if "$GNRMC" in data_list[i]:
print(data_list[i])
#删除","
result=data_list[i].split(',')
#$GNRMC,075622.000,A,3116.56922,N,12044.12475,E,0.00,0.00,020422,,,A,V*01
#['$GNRMC', '075622.000', 'A', '3116.56922', 'N', '12044.12475', 'E', '0.00', '0.00', '020422', '', '', 'A', 'V*01']
# 在GNRMC中取数据
if len(result)==14:
lat=latitude(result[3],result[4])
long=longitude(result[5],result[6])
tim=utcDateTime(result[9],result[1][:6],8)
print("lat:",lat)
print("long:",long)
print(tim)
#显示屏显示数据
disInfo("lat:"+str(lat)[:9],"lon:"+str(long)[:10])
print("---------------------2-------------------")
time.sleep(1)
if __name__=="__main__":
#创建一个串口实例
gps_module=UART()
#打开
gps_module.open("serial1")
#波特率可以在board.json中设置,也可以在代码中设置
#gps模块的波特率是9600
gps_module.setBaudRate(9600)
# 创建一个字节数组,用于接受串口数据
readBuf=bytearray(512)
#创建一个oled实例
disp=SSD1306_128_64()
# 初始化
disp.begin()
#清屏
disp.clear()
#主函数
main()
- ssd1306.py
import utime as time
import codetab
# Constants
SSD1306_I2C_ADDRESS = 0x3C # 011110+SA0+RW - 0x3C or 0x3D
SSD1306_SETCONTRAST = 0x81
SSD1306_DISPLAYALLON_RESUME = 0xA4
SSD1306_DISPLAYALLON = 0xA5
SSD1306_NORMALDISPLAY = 0xA6
SSD1306_INVERTDISPLAY = 0xA7
SSD1306_DISPLAYOFF = 0xAE
SSD1306_DISPLAYON = 0xAF
SSD1306_SETDISPLAYOFFSET = 0xD3
SSD1306_SETCOMPINS = 0xDA
SSD1306_SETVCOMDETECT = 0xDB
SSD1306_SETDISPLAYCLOCKDIV = 0xD5
SSD1306_SETPRECHARGE = 0xD9
SSD1306_SETMULTIPLEX = 0xA8
SSD1306_SETLOWCOLUMN = 0x00
SSD1306_SETHIGHCOLUMN = 0x10
SSD1306_SETSTARTLINE = 0x40
SSD1306_MEMORYMODE = 0x20
SSD1306_COLUMNADDR = 0x21
SSD1306_PAGEADDR = 0x22
SSD1306_COMSCANINC = 0xC0
SSD1306_COMSCANDEC = 0xC8
SSD1306_SEGREMAP = 0xA0
SSD1306_CHARGEPUMP = 0x8D
SSD1306_EXTERNALVCC = 0x1
SSD1306_SWITCHCAPVCC = 0x2
# Scrolling constants
SSD1306_ACTIVATE_SCROLL = 0x2F
SSD1306_DEACTIVATE_SCROLL = 0x2E
SSD1306_SET_VERTICAL_SCROLL_AREA = 0xA3
SSD1306_RIGHT_HORIZONTAL_SCROLL = 0x26
SSD1306_LEFT_HORIZONTAL_SCROLL = 0x27
SSD1306_VERTICAL_AND_RIGHT_HORIZONTAL_SCROLL = 0x29
SSD1306_VERTICAL_AND_LEFT_HORIZONTAL_SCROLL = 0x2A
class SSD1306Base(object):
def __init__(self, width, height):
self.width = width
self.height = height
self._pages = height//8
self._buffer = [0]*(width*self._pages)
# Handle hardware I2C
from driver import I2C
self._i2c=I2C()
self._i2c.open('OLED')
def _initialize(self):
raise NotImplementedError
def writeCmd(self, command):
"""Send command byte to display."""
# I2C write.
control = 0x00 # Co = 0, DC = 0
writeBuf=bytearray(2)
writeBuf[0]=control
writeBuf[1]=command
self._i2c.write(writeBuf,2)
def writeDat(self, data):
"""Send byte of data to display."""
# I2C write.
control = 0x40 # Co = 0, DC = 0
writeBuf=bytearray(2)
writeBuf[0]=control
writeBuf[1]=data
self._i2c.write(writeBuf,2)
def begin(self, vccstate=SSD1306_SWITCHCAPVCC):
"""Initialize display."""
# Save vcc state.
self._vccstate = vccstate
# Reset and initialize display.
# self.reset()
self._initialize()
# Turn on the display.
self.writeCmd(SSD1306_DISPLAYON)
# --------------------------------------------------------------
# Prototype : oled_fill(fill_data)
# Parameters : fill_data,范围0x00-0xff
# Description : 全屏填充,例如 0x00-全黑,0xff全亮
# --------------------------------------------------------------
def oled_fill(self,fill_data):
for i in range(8):
#page0-page1
self.writeCmd(0xb0+i)
# low colum start address
self.writeCmd(0x00)
#high colum start address
self.writeCmd(0x10)
for i in range(128*64):
self.writeDat(fill_data)
# --------------------------------------------------------------
# Prototype : clear()
# Parameters : none
# Description : 全黑
# --------------------------------------------------------------
def clear(self):
self.oled_fill(0x00)
# --------------------------------------------------------------
# Prototype : oled_setPos(x,y)
# Parameters : x,y -- 起始点坐标(x:0~127, y:0~7)
# Description : 设置起始坐标
# --------------------------------------------------------------
def oled_setPos(self,x,y):
self.writeCmd(0xb0+y)
self.writeCmd(((x&0xf0)>>4)|0x10)
self.writeCmd((x&0x0f)|0x01)
# --------------------------------------------------------------
# Prototype : oled_showCN(x,y,n)
# Parameters : x,y -- 起始点坐标(x:0~127, y:0~7); N:汉字在codetab.h中的索引
# Description : 显示codetab.py中的汉字,16*16点阵
# --------------------------------------------------------------
def oled_showCN(self,x,y,n):
self.oled_setPos(x,y)
adder=32*n
for i in range(16):
self.writeDat(codetab.F1[adder])
adder+=1
self.oled_setPos(x,y+1)
for i in range(16):
self.writeDat(codetab.F1[adder])
adder+=1
# --------------------------------------------------------------
# Prototype : oled_showStr(x,y,ch,TextSize)
# Parameters : x,y -- 起始点坐标(x:0~127, y:0~7); ch[] -- 要显示的字符串; TextSize -- 字符大小(1:6*8 ; 2:8*16)
# Description : 显示codetab.py中的ASCII字符,有6*8和8*16可选择
# --------------------------------------------------------------
def oled_showStr(self,x,y,ch,TextSize):
c=0
j=0
if TextSize==1:
while ch[j]!='\0':
#ord()将字符转换成十进制,如'a'->97
c=ord(ch[j])-32
if x>126:
x=0
y+=1
self.oled_setPos(x,y)
for i in range(6):
self.writeDat(codetab.F6x8[c][i])
x+=6
j+=1
#防止index out of range
if j==len(ch):
break
if TextSize==2:
while ch[j]!='\0':
#ord()将字符转换成十进制,如'a'->97
c=ord(ch[j])-32
if x>120:
x=0
y+=1
self.oled_setPos(x,y)
for i in range(8):
self.writeDat(codetab.F8X16[c*16+i])
self.oled_setPos(x,y+1)
for i in range(8):
self.writeDat(codetab.F8X16[c*16+i+8])
x+=8
j+=1
#防止index out of range
if j==len(ch):
break
# --------------------------------------------------------------
# Prototype : oled_showPicture(x0,y0,x1,y1,BMP)
# Parameters : x0,y0 -- 起始点坐标(x0:0~127, y0:0~7); x1,y1 -- 起点对角线(结束点)的坐标(x1:1~128,y1:128)
# Description : 显示BMP位图
# --------------------------------------------------------------
def oled_showPicture(self,x0,y0,x1,y1,BMP):
i=0
if y1%8==0:
y=y1/8
else:
y=y1/8+1
for y in range(y0,y1):
self.oled_setPos(x0,y)
for x in range(x0,x1):
self.writeDat(BMP[i])
i+=1
if i==len(BMP) :
break
# --------------------------------------------------------------
# Prototype : set_contrast(contrast)
# Parameters : coontrast,取值范围为0-255
# Description : 对比度/亮度调节
# --------------------------------------------------------------
def set_contrast(self, contrast):
if contrast < 0 or contrast > 255:
raise ValueError('Contrast must be a value from 0 to 255 (inclusive).')
self.writeCmd(SSD1306_SETCONTRAST)
self.writeCmd(contrast)
class SSD1306_128_64(SSD1306Base):
def __init__(self):
super(SSD1306_128_64, self).__init__(128, 64)
def _initialize(self):
# 128x64 pixel specific initialization.
self.writeCmd(SSD1306_DISPLAYOFF) # 0xAE
self.writeCmd(SSD1306_SETDISPLAYCLOCKDIV) # 0xD5
self.writeCmd(0x80) # the suggested ratio 0x80
self.writeCmd(SSD1306_SETMULTIPLEX) # 0xA8
self.writeCmd(0x3F)
self.writeCmd(SSD1306_SETDISPLAYOFFSET) # 0xD3
self.writeCmd(0x0) # no offset
self.writeCmd(SSD1306_SETSTARTLINE | 0x0) # line #0
self.writeCmd(SSD1306_CHARGEPUMP) # 0x8D
if self._vccstate == SSD1306_EXTERNALVCC:
self.writeCmd(0x10)
else:
self.writeCmd(0x14)
self.writeCmd(SSD1306_MEMORYMODE) # 0x20
self.writeCmd(0x00) # 0x0 act like ks0108
self.writeCmd(SSD1306_SEGREMAP | 0x1)
self.writeCmd(SSD1306_COMSCANDEC)
self.writeCmd(SSD1306_SETCOMPINS) # 0xDA
self.writeCmd(0x12)
self.writeCmd(SSD1306_SETCONTRAST) # 0x81
if self._vccstate == SSD1306_EXTERNALVCC:
self.writeCmd(0x9F)
else:
self.writeCmd(0xCF)
self.writeCmd(SSD1306_SETPRECHARGE) # 0xd9
if self._vccstate == SSD1306_EXTERNALVCC:
self.writeCmd(0x22)
else:
self.writeCmd(0xF1)
self.writeCmd(SSD1306_SETVCOMDETECT) # 0xDB
self.writeCmd(0x40)
self.writeCmd(SSD1306_DISPLAYALLON_RESUME) # 0xA4
self.writeCmd(SSD1306_NORMALDISPLAY) # 0xA6
class SSD1306_128_32(SSD1306Base):
def __init__(self):
super(SSD1306_128_32, self).__init__(128, 32)
def _initialize(self):
self.command(SSD1306_DISPLAYOFF) # 0xAE
self.command(SSD1306_SETDISPLAYCLOCKDIV) # 0xD5
self.command(0x80) # the suggested ratio 0x80
self.command(SSD1306_SETMULTIPLEX) # 0xA8
self.command(0x1F)
self.command(SSD1306_SETDISPLAYOFFSET) # 0xD3
self.command(0x0) # no offset
self.command(SSD1306_SETSTARTLINE | 0x0) # line #0
self.command(SSD1306_CHARGEPUMP) # 0x8D
if self._vccstate == SSD1306_EXTERNALVCC:
self.command(0x10)
else:
self.command(0x14)
self.command(SSD1306_MEMORYMODE) # 0x20
self.command(0x00) # 0x0 act like ks0108
self.command(SSD1306_SEGREMAP | 0x1)
self.command(SSD1306_COMSCANDEC)
self.command(SSD1306_SETCOMPINS) # 0xDA
self.command(0x02)
self.command(SSD1306_SETCONTRAST) # 0x81
self.command(0x8F)
self.command(SSD1306_SETPRECHARGE) # 0xd9
if self._vccstate == SSD1306_EXTERNALVCC:
self.command(0x22)
else:
self.command(0xF1)
self.command(SSD1306_SETVCOMDETECT) # 0xDB
self.command(0x40)
self.command(SSD1306_DISPLAYALLON_RESUME) # 0xA4
self.command(SSD1306_NORMALDISPLAY) # 0xA6
class SSD1306_96_16(SSD1306Base):
def __init__(self):
super(SSD1306_96_16, self).__init__(96, 16)
def _initialize(self):
self.command(SSD1306_DISPLAYOFF) # 0xAE
self.command(SSD1306_SETDISPLAYCLOCKDIV) # 0xD5
self.command(0x60) # the suggested ratio 0x60
self.command(SSD1306_SETMULTIPLEX) # 0xA8
self.command(0x0F)
self.command(SSD1306_SETDISPLAYOFFSET) # 0xD3
self.command(0x0) # no offset
self.command(SSD1306_SETSTARTLINE | 0x0) # line #0
self.command(SSD1306_CHARGEPUMP) # 0x8D
if self._vccstate == SSD1306_EXTERNALVCC:
self.command(0x10)
else:
self.command(0x14)
self.command(SSD1306_MEMORYMODE) # 0x20
self.command(0x00) # 0x0 act like ks0108
self.command(SSD1306_SEGREMAP | 0x1)
self.command(SSD1306_COMSCANDEC)
self.command(SSD1306_SETCOMPINS) # 0xDA
self.command(0x02)
self.command(SSD1306_SETCONTRAST) # 0x81
self.command(0x8F)
self.command(SSD1306_SETPRECHARGE) # 0xd9
if self._vccstate == SSD1306_EXTERNALVCC:
self.command(0x22)
else:
self.command(0xF1)
self.command(SSD1306_SETVCOMDETECT) # 0xDB
self.command(0x40)
self.command(SSD1306_DISPLAYALLON_RESUME) # 0xA4
self.command(SSD1306_NORMALDISPLAY) # 0xA6
- codetab.py
##*-- 文字: 煜 --*#
##*-- 文字: 瑛 --*#
##*-- 文字: 物 --*#
##*-- 文字: 联 --*#
##*-- 文字: 网 --*#
##*-- 宋体12; 此字体下对应的点阵为:宽x高=16x16 --*#
#列表大小:10*16
F1=[
0x80,0x70,0x00,0xFF,0x10,0x08,0x00,0x7E,0x2A,0xAA,0x2A,0x2A,0x2A,0x7E,0x00,0x00,
0x80,0x60,0x18,0x07,0x08,0x50,0x42,0x4A,0x52,0x42,0x43,0x42,0x52,0x4A,0x42,0x00, #煜
0x84,0x84,0xFC,0x84,0x84,0x00,0x04,0xC4,0x5F,0x44,0xF4,0x44,0x5F,0xC4,0x04,0x00,
0x10,0x30,0x1F,0x08,0x08,0x00,0x84,0x47,0x24,0x14,0x0F,0x14,0x24,0x47,0x84,0x00, #瑛
0x40,0x3C,0x10,0xFF,0x10,0x10,0x20,0x10,0x8F,0x78,0x08,0xF8,0x08,0xF8,0x00,0x00,
0x02,0x06,0x02,0xFF,0x01,0x01,0x04,0x42,0x21,0x18,0x46,0x81,0x40,0x3F,0x00,0x00, #物
0x02,0xFE,0x92,0x92,0xFE,0x02,0x00,0x10,0x11,0x16,0xF0,0x14,0x13,0x10,0x00,0x00,
0x10,0x1F,0x08,0x08,0xFF,0x04,0x81,0x41,0x31,0x0D,0x03,0x0D,0x31,0x41,0x81,0x00, #联
0x00,0xFE,0x02,0x22,0x42,0x82,0x72,0x02,0x22,0x42,0x82,0x72,0x02,0xFE,0x00,0x00,
0x00,0xFF,0x10,0x08,0x06,0x01,0x0E,0x10,0x08,0x06,0x01,0x4E,0x80,0x7F,0x00,0x00, #网
]
# 每个字符是8x16(宽x高) 点阵,
F2=[
0x10,0xF0,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20, #*"h",0*#
0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x19,0x24,0x24,0x12,0x3F,0x20,0x00, #*"a",1*#
0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x19,0x24,0x24,0x12,0x3F,0x20,0x00, #*"a",2*#
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00, #*"s",3*#
0x00,0xF8,0x88,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x20,0x20,0x20,0x11,0x0E,0x00, #*"5",4*#
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00, #*"0",5*#
0x00,0xE0,0x10,0x88,0x88,0x90,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x20,0x1F,0x00, #*"6",6*#
]
#字符串 6x8点阵
F6x8=[
[0x00, 0x00, 0x00, 0x00, 0x00, 0x00],# sp
[0x00, 0x00, 0x00, 0x2f, 0x00, 0x00],# !
[0x00, 0x00, 0x07, 0x00, 0x07, 0x00],# "
[0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14],# #
[0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12],# $
[0x00, 0x62, 0x64, 0x08, 0x13, 0x23],# %
[0x00, 0x36, 0x49, 0x55, 0x22, 0x50],# &
[0x00, 0x00, 0x05, 0x03, 0x00, 0x00],# '
[0x00, 0x00, 0x1c, 0x22, 0x41, 0x00],# (
[0x00, 0x00, 0x41, 0x22, 0x1c, 0x00],# )
[0x00, 0x14, 0x08, 0x3E, 0x08, 0x14],# *
[0x00, 0x08, 0x08, 0x3E, 0x08, 0x08],# +
[0x00, 0x00, 0x00, 0xA0, 0x60, 0x00],# ,
[0x00, 0x08, 0x08, 0x08, 0x08, 0x08],# -
[0x00, 0x00, 0x60, 0x60, 0x00, 0x00],# .
[0x00, 0x20, 0x10, 0x08, 0x04, 0x02],# #
[0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E],# 0
[0x00, 0x00, 0x42, 0x7F, 0x40, 0x00],# 1
[0x00, 0x42, 0x61, 0x51, 0x49, 0x46],# 2
[0x00, 0x21, 0x41, 0x45, 0x4B, 0x31],# 3
[0x00, 0x18, 0x14, 0x12, 0x7F, 0x10],# 4
[0x00, 0x27, 0x45, 0x45, 0x45, 0x39],# 5
[0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30],# 6
[0x00, 0x01, 0x71, 0x09, 0x05, 0x03],# 7
[0x00, 0x36, 0x49, 0x49, 0x49, 0x36],# 8
[0x00, 0x06, 0x49, 0x49, 0x29, 0x1E],# 9
[0x00, 0x00, 0x36, 0x36, 0x00, 0x00],# :
[0x00, 0x00, 0x56, 0x36, 0x00, 0x00],# ;
[0x00, 0x08, 0x14, 0x22, 0x41, 0x00],# <
[0x00, 0x14, 0x14, 0x14, 0x14, 0x14],# =
[0x00, 0x00, 0x41, 0x22, 0x14, 0x08],# >
[0x00, 0x02, 0x01, 0x51, 0x09, 0x06],# ?
[0x00, 0x32, 0x49, 0x59, 0x51, 0x3E],# @
[0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C],# A
[0x00, 0x7F, 0x49, 0x49, 0x49, 0x36],# B
[0x00, 0x3E, 0x41, 0x41, 0x41, 0x22],# C
[0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C],# D
[0x00, 0x7F, 0x49, 0x49, 0x49, 0x41],# E
[0x00, 0x7F, 0x09, 0x09, 0x09, 0x01],# F
[0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A],# G
[0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F],# H
[0x00, 0x00, 0x41, 0x7F, 0x41, 0x00],# I
[0x00, 0x20, 0x40, 0x41, 0x3F, 0x01],# J
[0x00, 0x7F, 0x08, 0x14, 0x22, 0x41],# K
[0x00, 0x7F, 0x40, 0x40, 0x40, 0x40],# L
[0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F],# M
[0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F],# N
[0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E],# O
[0x00, 0x7F, 0x09, 0x09, 0x09, 0x06],# P
[0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E],# Q
[0x00, 0x7F, 0x09, 0x19, 0x29, 0x46],# R
[0x00, 0x46, 0x49, 0x49, 0x49, 0x31],# S
[0x00, 0x01, 0x01, 0x7F, 0x01, 0x01],# T
[0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F],# U
[0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F],# V
[0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F],# W
[0x00, 0x63, 0x14, 0x08, 0x14, 0x63],# X
[0x00, 0x07, 0x08, 0x70, 0x08, 0x07],# Y
[0x00, 0x61, 0x51, 0x49, 0x45, 0x43],# Z
[0x00, 0x00, 0x7F, 0x41, 0x41, 0x00],# [
[0x00, 0x55, 0x2A, 0x55, 0x2A, 0x55],# 55
[0x00, 0x00, 0x41, 0x41, 0x7F, 0x00],# ]
[0x00, 0x04, 0x02, 0x01, 0x02, 0x04],# ^
[0x00, 0x40, 0x40, 0x40, 0x40, 0x40],# _
[0x00, 0x00, 0x01, 0x02, 0x04, 0x00],# '
[0x00, 0x20, 0x54, 0x54, 0x54, 0x78],# a
[0x00, 0x7F, 0x48, 0x44, 0x44, 0x38],# b
[0x00, 0x38, 0x44, 0x44, 0x44, 0x20],# c
[0x00, 0x38, 0x44, 0x44, 0x48, 0x7F],# d
[0x00, 0x38, 0x54, 0x54, 0x54, 0x18],# e
[0x00, 0x08, 0x7E, 0x09, 0x01, 0x02],# f
[0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C],# g
[0x00, 0x7F, 0x08, 0x04, 0x04, 0x78],# h
[0x00, 0x00, 0x44, 0x7D, 0x40, 0x00],# i
[0x00, 0x40, 0x80, 0x84, 0x7D, 0x00],# j
[0x00, 0x7F, 0x10, 0x28, 0x44, 0x00],# k
[0x00, 0x00, 0x41, 0x7F, 0x40, 0x00],# l
[0x00, 0x7C, 0x04, 0x18, 0x04, 0x78],# m
[0x00, 0x7C, 0x08, 0x04, 0x04, 0x78],# n
[0x00, 0x38, 0x44, 0x44, 0x44, 0x38],# o
[0x00, 0xFC, 0x24, 0x24, 0x24, 0x18],# p
[0x00, 0x18, 0x24, 0x24, 0x18, 0xFC],# q
[0x00, 0x7C, 0x08, 0x04, 0x04, 0x08],# r
[0x00, 0x48, 0x54, 0x54, 0x54, 0x20],# s
[0x00, 0x04, 0x3F, 0x44, 0x40, 0x20],# t
[0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C],# u
[0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C],# v
[0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C],# w
[0x00, 0x44, 0x28, 0x10, 0x28, 0x44],# x
[0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C],# y
[0x00, 0x44, 0x64, 0x54, 0x4C, 0x44],# z
[0x14, 0x14, 0x14, 0x14, 0x14, 0x14]# horiz lines
]
#字符串 8x16点阵
F8X16=[
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,# 0
0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,#! 1
0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#" 2
0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,## 3
0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,#$ 4
0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,#% 5
0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,#& 6
0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#' 7
0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,#( 8
0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,#) 9
0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,#* 10
0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,#+ 11
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,#, 12
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,#- 13
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,#. 14
0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,## 15
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,#0 16
0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,#1 17
0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,#2 18
0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,#3 19
0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,#4 20
0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,#5 21
0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,#6 22
0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,#7 23
0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,#8 24
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,#9 25
0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,#: 26
0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,#; 27
0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,#< 28
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,#= 29
0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,#> 30
0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,#? 31
0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,#@ 32
0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,#A 33
0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,#B 34
0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,#C 35
0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,#D 36
0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,#E 37
0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,#F 38
0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,#G 39
0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,#H 40
0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,#I 41
0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,#J 42
0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,#K 43
0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,#L 44
0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,#M 45
0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,#N 46
0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,#O 47
0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,#P 48
0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,#Q 49
0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,#R 50
0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,#S 51
0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,#T 52
0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,#U 53
0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,#V 54
0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,#W 55
0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,#X 56
0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,#Y 57
0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,#Z 58
0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,#[ 59
0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,#\ 60
0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,#] 61
0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#^ 62
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,#_ 63
0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#` 64
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,#a 65
0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,#b 66
0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,#c 67
0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,#d 68
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,#e 69
0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,#f 70
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,#g 71
0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,#h 72
0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,#i 73
0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,#j 74
0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,#k 75
0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,#l 76
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,#m 77
0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,#n 78
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,#o 79
0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,#p 80
0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,#q 81
0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,#r 82
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,#s 83
0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,#t 84
0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,#u 85
0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,#v 86
0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,#w 87
0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,#x 88
0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,#y 89
0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,#z 90
0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,# 91
0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,#| 92
0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,# 93
0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,#~ 94
]
BMP1=[
0x00,0x03,0x05,0x09,0x11,0xFF,0x11,0x89,0x05,0xC3,0x00,0xE0,0x00,0xF0,0x00,0xF8,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x44,0x28,0xFF,0x11,0xAA,0x44,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x01,0x38,0x44,0x82,0x92,
0x92,0x74,0x01,0x83,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x44,0xC7,0x01,0x7D,
0x7D,0x7D,0x7D,0x01,0x7D,0x7D,0x7D,0x7D,0x01,0x7D,0x7D,0x7D,0x7D,0x01,0xFF,0x00,
0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x40,0x40,0x00,0x00,
0x6D,0x6D,0x6D,0x6D,0x6D,0x00,0x00,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x40,0x40,
0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0x00,
0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0x00,0xDB,0xDB,0xDB,0xDB,0xDB,0x00,0x00,0xDB,0xDB,
0xDB,0xDB,0xDB,0x00,0x00,0xDA,0xDA,0xDA,0xDA,0xDA,0x00,0x00,0xD8,0xD8,0xD8,0xD8,
0xD8,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,
0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x80,
0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x00,0x00,
0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x06,0x06,
0x06,0x06,0x06,0x00,0x00,0x06,0x06,0x06,0xE6,0x66,0x20,0x00,0x06,0x06,0x86,0x06,
0x06,0x00,0x00,0x06,0x06,0x06,0x06,0x86,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x00,
0x00,0x86,0x86,0x86,0x86,0x86,0x80,0x80,0x86,0x86,0x06,0x86,0x86,0xC0,0xC0,0x86,
0x86,0x86,0x06,0x06,0xD0,0x30,0x76,0x06,0x06,0x06,0x06,0x00,0x00,0x06,0x06,0x06,
0x06,0x06,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x06,0x06,0x06,0x06,0x06,
0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x1C,0x00,0xFE,0x00,0x01,
0x02,0x00,0xC4,0x18,0x20,0x02,0x9E,0x63,0xB2,0x0E,0x00,0xFF,0x81,0x81,0xFF,0x00,
0x00,0x80,0x40,0x30,0x0F,0x00,0x00,0x00,0x00,0xFF,0x00,0x23,0xEA,0xAA,0xBF,0xAA,
0xEA,0x03,0x3F,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x0C,0x08,0x00,0x00,0x01,0x01,0x01,
0x01,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x81,0x80,0x80,0x81,0x80,
0x81,0x80,0x80,0x80,0x80,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,
0x01,0x00,0x01,0x01,0x09,0x0C,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,
0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,
0x00,0x1E,0x21,0x40,0x40,0x50,0x21,0x5E,0x00,0x1E,0x21,0x40,0x40,0x50,0x21,0x5E,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xC1,0xC1,0xFF,
0xFF,0xC1,0xC1,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x80,0xFC,0xF3,0xEF,0xF3,0xFC,
0x80,0xFF,0x80,0xEE,0xEE,0xEE,0xF5,0xFB,0xFF,0x9C,0xBE,0xB6,0xB6,0x88,0xFF,0x00
]
#像素:64*64
#列表大小:32*16
BMP2=[
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,
0x60,0x38,0x08,0x0C,0x06,0xC2,0xE2,0x33,0x11,0xF9,0x11,0x33,0x73,0xE2,0x06,0x04,
0x0C,0x18,0x30,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xF7,
0x00,0x00,0x00,0x00,0x00,0xC3,0x87,0x06,0x0C,0xFF,0x0C,0x18,0x18,0xF0,0xE0,0x00,
0x00,0x00,0x00,0x81,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x07,0x0C,0x18,0x30,0x30,0x61,0x63,0x46,0x46,0x5F,0x46,0x46,0x43,0x63,0x20,0x30,
0x18,0x0C,0x06,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,0x80,0xE0,0xE0,0xF0,0xE0,0xE0,0xC0,0x60,0x70,0x30,0x38,0x18,0x18,0x0C,
0x0C,0x0C,0x66,0x66,0x66,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,
0x66,0x66,0x0C,0x0C,0x0C,0x18,0x18,0x30,0x30,0x60,0xE0,0xE0,0x70,0x38,0x18,0x0C,
0xFC,0xFC,0x1C,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xC7,0xFF,0x79,0x1B,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0xC3,0xC3,0xC7,0x06,0x0C,0x18,0x70,0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x83,0xFF,0x7F,0x00,0x00,
0x00,0x00,0x00,0x03,0x07,0xFE,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0xC0,
0xC0,0xC0,0x60,0x60,0x30,0x30,0x18,0x1C,0x0E,0x06,0x03,0x03,0x01,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x3F,0x78,0xE0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,
0xFE,0xFE,0x06,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,
0x1C,0x38,0xF0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xDC,0xFF,0xC3,0x01,0x01,0x01,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
]
#32-32.bmp
BMP3=[
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x0E,0x02,0x9B,0xBD,0xFF,0x65,0xED,0xCB,
0x06,0x9C,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0x60,0x61,0x23,0xF6,0xFD,0x7F,0x7F,0x7B,0x7D,0xF4,
0xF6,0x23,0x60,0x60,0xC0,0xC0,0x60,0x60,0xE0,0x60,0x20,0x00,0x00,0x00,0x00,0x00,
0x20,0xFF,0x8F,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x1B,0x06,0x0C,0x18,0x90,0xF0,0x20,
0x00,0x01,0x1F,0x7E,0xE0,0x80,0x80,0xA0,0xF0,0x30,0x20,0x20,0x20,0x20,0x20,0x20,
0x60,0xC0,0x80,0x80,0xF0,0xF0,0x18,0x18,0x08,0x0C,0x04,0x06,0x03,0x01,0x01,0x00,
]
repl口重定向到RS232
- board.json
{
"name": "haas506",
"version": "2.0.0",
"io": {
"OLED": {
"type": "I2C",
"port": 1,
"addrWidth": 7,
"freq": 400000,
"mode": "master",
"devAddr": 60
},
"serial1":{
"type":"UART",
"port":0,
"dataWidth":8,
"baudRate":9600,
"stopBits":1,
"flowControl":"disable",
"parity":"none"
},
"serial2":{
"type":"UART",
"port":1,
"dataWidth":8,
"baudRate":115200,
"stopBits":1,
"flowControl":"disable",
"parity":"none"
},
"serial3":{
"type":"UART",
"port":2,
"dataWidth":8,
"baudRate":115200,
"stopBits":1,
"flowControl":"disable",
"parity":"none"
}
},
"debugLevel": "ERROR",
"repl":"enable",
"replPort":1
}
5.测试结果
oled显示所在经纬度
输出日志