6254| 3
|
[项目] 【嘉年华展示】M5Stack——班主任助手 |
本帖最后由 云天 于 2019-10-1 09:43 编辑 M5Stack拿到手,在外观上看着就感觉很不错。 M5Stack是一种模块化、可堆叠扩展的开发板,每个模块均为5cmX5cm的尺寸,这也是M5Stack名字的由来。 与常规的开发板不同,M5Stack更注重产品形态的完整性,更注重用户的应用场景和研发的简易性,M5没有密密麻麻的飞线,没有错乱无章的接口插头,不需要繁琐的开发流程,简简单单、轻轻松松地完成高质量的电子原型创作。 M5Stack主要采用ESP32芯片体系,CORE主机内已集成了240M双核主频CPU、 WiFi、蓝牙、2.0寸彩色屏幕、喇叭、按键、TF卡、陀螺仪以及内置电池。CORE基本满足一般的功能需求,功能模块FunctionModule则根据应用的情况选择,比如电机驱动、信号采集、通信等功能。另外,也会配备不同的应用底座及配件,方便用户做出高质量的研发。 在使用手册上Quick Start中,提示安装Arduino IDE,加载ESP32 Board,连接失败,加载库 M5Stack 速度很慢。这应该和连接的网站有关系,相关网站也提供了镜像。 暂时不使用Arduino IDE了,果断采用由M5官方自主研发的图形化网络化IDE平台--UIFlow,它支持Blockly以及MicroPython编程(可选择中文版),也支持网络推送部署以及就地USB下载调试。 项目:班主任助手 设计背景: 我所在的高中是县高中,班里所有学生都住校,个别学生的家在几百公里以外。学校对学生使用手机有着严格的规定,在学校内禁止私自使用手机。学生与家长的联系主要是通过校内固定电话、到班主任处拿个人手机。而家长联系学生只能通过班主任这一种方式。而班主任又不是每天都在学校,如早自习和晚辅导,尤其是周六日。这样家长通知孩子的一些事,如要来看孩子、给孩子拿了什么东西,比如衣服、药品等,又不能确定时间。家长和班主任联系,班主任不在学校,只能与学校的同办公室的值班老师联系,他可能在上课,也可能电话不在身边等等情况,很不方便。为此,我们将使用M5Stack解决这一问题。 设计思路: 设计手机APP,通过LOT与M5Stack通信,传递班主任的信息。将M5Stack放置在班级里,安排专门学生负责在课间查看。 实现条件: M5Stack有WiFi功能,可以连接学校校园网,利用“2.0寸彩色屏幕”,显示要通知的信息,喇叭可以用来提醒“有信息”,三个按键满足信息上下翻页浏览。内置电池,不用外接电源,班级放置位置可选择空间大。 设计过程: 1、M5Stack连接互联网 使用校园网WIFI进行互联网连接,具体可能参考https://m5stack.oss-cn-shenzhen. ... Flow-Book-zh_cn.pdf,56页“配置WIFI”。 2、配置Easy lot Easy IoT是一个国际化物联网服务平台 https://iot.dfrobot.com.cn/,可以对联网的传感器/执行器数据进行实时监控和反馈,统计和分析已经接收的数据,并向传感器/执行器发送数据,帮助实现控制效果。 操作方法可参考https://iot.dfrobot.com.cn/docs/。 3、M5Stack M5Flow连接Easy lot程序设计 4、解决使用M5Flow显示汉字问题,16*16 M5Flow不支持显示汉字,已和技术员沟通,“arduino”里有示例。因我暂时不想跑“arduino”。只能来到M5Flow中的Python试一试,经过不断摸索终于显示汉字。 附上代码 [mw_shl_code=python,true] from m5stack import * from m5ui import * from uiflow import * import binascii setScreenColor(0x222222) KEYS = [0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01] #初始化16*16的点阵位置,每个汉字需要16*16=256个点来表示 rect_list = [] * 16 for i in range(16): rect_list.append([] * 16) font_rect=[0x00,0x00,0x01,0x00,0x01,0x00,0x7f,0xfc,0x40,0x04,0x41,0x04,0x01,0x00,0xff,0xfe,0x03,0x80,0x05,0x40,0x09,0x20,0x11,0x10,0x61,0x0c,0x41,0x04,0x00,0x00,0x00,0x00] #先拿“宋”字进行演示 #根据读取到HZK中数据给我们的16*16点阵赋值 for k in range(len(font_rect) // 2): row_list = rect_list[k] for j in range(2): for i in range(8): asc = font_rect[k * 2 + j] flag = asc & KEYS row_list.append(flag) #根据获取到的16*16点阵信息,打印到控制台 for row in rect_list: k=0 for i in row: if i: #前景字符(即用来表示汉字笔画的输出字符) lcd.pixel(k, j, 0xffffff) k=k+1 j=j+1 [/mw_shl_code] 5、汉字显示 24*24 [mw_shl_code=python,true] from m5stack import * from m5ui import * from uiflow import * import binascii setScreenColor(0x222222) KEYS = [0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01] #初始化24*24的点阵位置,每个汉字需要24*24=256个点来表示 rect_list = [] * 24 for i in range(24): rect_list.append([] * 24) font_rect=[0x00,0x08,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,0x3F,0xFF,0xFC,0x3F,0xFF,0xFC,0x3F,0xFF,0xFC,0x38,0x1C,0x1C,0x38,0x1C,0x1C,0x00,0x1C,0x00,0x00,0x1C,0x00,0x3F,0xFF,0xFC,0x3F,0xFF,0xFC,0x3F,0xFF,0xFC,0x00,0x7E,0x00,0x00,0xFF,0x00,0x01,0xDD,0x80, 0x03,0x9D,0xC0,0x07,0x1C,0xF0,0x1F,0x1C, 0x7E,0x7C,0x1C,0x3E,0x38,0x1C,0x1C,0x30,0x1C,0x00,0x00,0x1C,0x00,0x00,0x00,0x00] #先拿“宋”字进行演示 #根据读取到HZK中数据给我们的24*24点阵赋值 for k in range(len(font_rect) // 3): row_list = rect_list[k] for j in range(3): for i in range(8): asc = font_rect[k * 3 + j] flag = asc & KEYS row_list.append(flag) #根据获取到的24*24点阵信息,打印到控制台 for row in rect_list: k=0 for i in row: if i: #前景字符(即用来表示汉字笔画的输出字符) lcd.pixel(k, j, 0xffffff) k=k+1 j=j+1 [/mw_shl_code] 6、汉字取模程序 7、显示多字 [mw_shl_code=python,true]from m5stack import * from m5ui import * from uiflow import * import binascii def first_index(my_list, elem): try: index = my_list.index(elem) + 1 except: index = 0 return index setScreenColor(0x222222) KEYS = [0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01] #初始化24*24的点阵位置,每个汉字需要24*24=256个点来表示 font_rect1={'班':[0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x7C,0x0F,0x8F,0xF0,0x1F,0x0C,0xC0,0x06,0x0C,0xC0,0x06,0x08,0xC0,0x06,0x68,0xC0,0x07,0xE8,0xF0,0x1F,0x6B,0xF8,0x0E,0x69,0xC0,0x06,0x18,0xC0,0x06,0x18,0xC0,0x06,0x90,0xC0,0x07,0x30,0xC0,0x1E,0x30,0xFE,0x78,0x6F,0xFE,0x30,0x60,0x00,0x00,0xC0,0x00,0x01,0x80,0x00,0x03,0x00,0x00,0x00,0x00,0x00],'主': [0x00,0x20,0x00,0x00,0x3C,0x00,0x00,0x1E,0x00,0x00,0x0E,0x00,0x00,0x04,0x00,0x00,0x00,0x80,0x00,0x0F,0xE0,0x00,0xFF,0xC0,0x03,0xF8,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x1F,0x80,0x00,0xFF,0x80,0x03,0xF8,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0xFC,0x00,0xFF,0xFE,0x7F,0xF8,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],'任':[0x00,0x00,0x00,0x01,0x00,0x00,0x01,0x80,0x40,0x03,0x80,0xF0,0x03,0x03,0xE0,0x07,0x0F,0x00,0x06,0x7F,0x00,0x0C,0x03,0x00,0x0E,0x03,0x00,0x1E,0x03,0x00,0x32,0x03,0x3E,0x22,0x0F,0xFF,0x43,0xFF,0x00,0x82,0x83,0x00,0x02,0x03,0x00,0x06,0x03,0x00,0x06,0x03,0x00,0x06,0x03,0x00,0x06,0x07,0xF8,0x06,0x7F,0xF8,0x06,0x20,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],'助': [0x00,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0xC0,0x00,0x00,0xC0,0x01,0xE0,0xC0,0x1F,0x61,0x80,0x0C,0x61,0x80,0x0C,0x61,0xB8,0x0F,0x43,0xFC,0x0F,0x5F,0x98,0x0C,0x41,0x18,0x0C,0xC3,0x18,0x0F,0xC3,0x18,0x0C,0xC2,0x18,0x0C,0xD6,0x30,0x0C,0xE4,0x30,0x0F,0x8C,0x30,0x3E,0x08,0x30,0x78,0x19,0xF0,0x20,0x30,0xE0,0x00,0x60,0xE0,0x00,0xC0,0x40,0x00,0x00,0x00,0x00,0x00,0x00],'手': [0x00,0x02,0x00,0x00,0x07,0x80,0x00,0x1F,0x00,0x00,0xF8,0x00,0x01,0xF0,0x00,0x00,0x18,0x00,0x00,0x1F,0x80,0x00,0xFF,0x80,0x01,0xF8,0x00,0x00,0x08,0x00,0x00,0x08,0xFC,0x00,0x3F,0xFE,0x3F,0xFC,0x0C,0x7E,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x1C,0x00,0x00,0x18,0x00,0x00,0xF8,0x00,0x00,0x78,0x00,0x00,0x30,0x00]} def font_show(font_con): for m in range(len(font_con)): font=font_rect1.get(font_con[m]) #根据读取到数据给我们的24*24点阵赋值 rect_list = [] * 24 for i in range(24): rect_list.append([] * 24) for k in range(len(font) // 3): row_list = rect_list[k] for j in range(3): for i in range(8): asc = font[k * 3 + j] flag = asc & KEYS row_list.append(flag) #根据获取到的24*24点阵信息,打印到控制台 j=0 for row in rect_list: k=0 for i in row: if i: #前景字符(即用来表示汉字笔画的输出字符) lcd.pixel(m*24+k, j, 0xffffff) k=k+1 j=j+1 font="班主任助手" font_show(font)[/mw_shl_code] 8、多行显示 [mw_shl_code=python,true]from m5stack import * from m5ui import * from uiflow import * import binascii def first_index(my_list, elem): try: index = my_list.index(elem) + 1 except: index = 0 return index setScreenColor(0x222222) KEYS = [0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01] #初始化24*24的点阵位置,每个汉字需要24*24=256个点来表示 font_rect1={'班':[0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x7C,0x0F,0x8F,0xF0,0x1F,0x0C,0xC0,0x06,0x0C,0xC0,0x06,0x08,0xC0,0x06,0x68,0xC0,0x07,0xE8,0xF0,0x1F,0x6B,0xF8,0x0E,0x69,0xC0,0x06,0x18,0xC0,0x06,0x18,0xC0,0x06,0x90,0xC0,0x07,0x30,0xC0,0x1E,0x30,0xFE,0x78,0x6F,0xFE,0x30,0x60,0x00,0x00,0xC0,0x00,0x01,0x80,0x00,0x03,0x00,0x00,0x00,0x00,0x00],'主': [0x00,0x20,0x00,0x00,0x3C,0x00,0x00,0x1E,0x00,0x00,0x0E,0x00,0x00,0x04,0x00,0x00,0x00,0x80,0x00,0x0F,0xE0,0x00,0xFF,0xC0,0x03,0xF8,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x1F,0x80,0x00,0xFF,0x80,0x03,0xF8,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0xFC,0x00,0xFF,0xFE,0x7F,0xF8,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],'任':[0x00,0x00,0x00,0x01,0x00,0x00,0x01,0x80,0x40,0x03,0x80,0xF0,0x03,0x03,0xE0,0x07,0x0F,0x00,0x06,0x7F,0x00,0x0C,0x03,0x00,0x0E,0x03,0x00,0x1E,0x03,0x00,0x32,0x03,0x3E,0x22,0x0F,0xFF,0x43,0xFF,0x00,0x82,0x83,0x00,0x02,0x03,0x00,0x06,0x03,0x00,0x06,0x03,0x00,0x06,0x03,0x00,0x06,0x07,0xF8,0x06,0x7F,0xF8,0x06,0x20,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],'助': [0x00,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0xC0,0x00,0x00,0xC0,0x01,0xE0,0xC0,0x1F,0x61,0x80,0x0C,0x61,0x80,0x0C,0x61,0xB8,0x0F,0x43,0xFC,0x0F,0x5F,0x98,0x0C,0x41,0x18,0x0C,0xC3,0x18,0x0F,0xC3,0x18,0x0C,0xC2,0x18,0x0C,0xD6,0x30,0x0C,0xE4,0x30,0x0F,0x8C,0x30,0x3E,0x08,0x30,0x78,0x19,0xF0,0x20,0x30,0xE0,0x00,0x60,0xE0,0x00,0xC0,0x40,0x00,0x00,0x00,0x00,0x00,0x00],'手': [0x00,0x02,0x00,0x00,0x07,0x80,0x00,0x1F,0x00,0x00,0xF8,0x00,0x01,0xF0,0x00,0x00,0x18,0x00,0x00,0x1F,0x80,0x00,0xFF,0x80,0x01,0xF8,0x00,0x00,0x08,0x00,0x00,0x08,0xFC,0x00,0x3F,0xFE,0x3F,0xFC,0x0C,0x7E,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x1C,0x00,0x00,0x18,0x00,0x00,0xF8,0x00,0x00,0x78,0x00,0x00,0x30,0x00],"张":[0x00,0x10,0x00,0x00,0x1C,0x00,0x01,0x98,0x60,0x0F,0xD8,0xE0,0x1D,0x98,0xC0,0x01,0x19,0x80,0x03,0x19,0x00,0x03,0x1A,0x00,0x1F,0x1C,0x00,0x18,0x18,0xF0,0x18,0x1F,0xF0,0x18,0xFE,0x00,0x1F,0x1A,0x00,0x3B,0x19,0x00,0x33,0x19,0x80,0x03,0x18,0xC0,0x03,0x18,0xE0,0x03,0x18,0x7C,0x06,0x1B,0x3F,0x1E,0x1E,0x08,0x1E,0x3C,0x00,0x0C,0x38,0x00,0x00,0x10,0x00,0x00,0x00,0x00],"磊":[0x00,0x00,0x00,0x00,0x0F,0xE0,0x00,0xFF,0x80,0x00,0x18,0x00,0x00,0x38,0x00,0x00,0x33,0xE0,0x00,0x7E,0xE0,0x00,0xE0,0xC0,0x01,0xE1,0xC0,0x07,0x7F,0xC0,0x0C,0x30,0x00,0x00,0x00,0x1E,0x00,0x7F,0xFE,0x0F,0xF3,0xC0,0x01,0x80,0xC0,0x01,0x81,0x80,0x03,0x73,0xFC,0x07,0xF3,0xDC,0x06,0x37,0x1C,0x0E,0x6F,0x18,0x1F,0xFB,0xFC,0x62,0x23,0x80,0x02,0x01,0x00,0x00,0x00,0x00],"到":[0x00,0x00,0x38,0x00,0x00,0x18,0x00,0x70,0x18,0x03,0xF0,0x18,0x1F,0xC0,0x18,0x01,0x83,0x18,0x03,0x01,0x98,0x06,0x31,0x18,0x0C,0x79,0x18,0x1F,0xD9,0x18,0x1F,0x99,0x18,0x11,0x81,0x18,0x01,0xA1,0x98,0x03,0xF1,0x98,0x0F,0x83,0x18,0x01,0x81,0x18,0x01,0x98,0x18,0x01,0xF0,0x18,0x7F,0x80,0x18,0x7C,0x00,0x98,0x10,0x00,0x78,0x00,0x00,0x78,0x00,0x00,0x38,0x00,0x00,0x00],"门":[0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x40,0x01,0xC7,0xF0,0x00,0xDE,0x70,0x0C,0x00,0x30,0x0E,0x00,0x30,0x06,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x0C,0x00,0x30,0x0C,0x00,0x30,0x0C,0x01,0xF0,0x0C,0x00,0xF0,0x04,0x00,0x70,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00],"卫":[0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x0F,0xE0,0x0F,0xFF,0xE0,0x0F,0xE0,0xC0,0x00,0x70,0xC0,0x00,0x70,0xC0,0x00,0x71,0xC0,0x00,0x71,0x80,0x00,0x65,0x80,0x00,0x67,0x80,0x00,0x63,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x63,0xF8,0x03,0xFF,0xFC,0xFF,0xC0,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"处":[0x00,0x00,0x00,0x00,0x06,0x00,0x02,0x07,0x00,0x03,0x03,0x00,0x03,0x02,0x00,0x03,0x02,0x00,0x06,0x02,0x00,0x06,0xE2,0x00,0x07,0xE3,0xE0,0x0C,0x62,0x70,0x08,0xC2,0x38,0x1C,0xC2,0x18,0x37,0x86,0x00,0x23,0x86,0x00,0x01,0x86,0x00,0x03,0xC6,0x00,0x06,0x32,0x00,0x0C,0x18,0x00,0x18,0x0E,0x00,0x30,0x07,0xC0,0x40,0x03,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"取":[0x00,0x00,0x00,0x00,0xF8,0x00,0x1F,0xF8,0x00,0x3E,0xC0,0x00,0x0C,0xC0,0x60,0x0C,0xC3,0xF0,0x0D,0xDF,0xE0,0x0F,0xC0,0xE0,0x0C,0xD8,0xC0,0x0C,0xCC,0xC0,0x0F,0xC6,0xC0,0x0F,0xC3,0x80,0x08,0xC1,0x80,0x08,0xF1,0x80,0x09,0xC3,0xC0,0x0F,0xC6,0xE0,0xFC,0xDC,0x78,0x60,0xF0,0x3F,0x00,0xC0,0x1E,0x00,0xC0,0x00,0x00,0xC0,0x00,0x00,0xC0,0x00,0x00,0x80,0x00,0x00,0x00,0x00],"东":[0x00,0x10,0x00,0x00,0x18,0x00,0x00,0x1C,0x00,0x00,0x18,0x00,0x00,0x30,0x00,0x00,0x33,0xF0,0x00,0x7F,0xF0,0x0F,0xF8,0x00,0x06,0x40,0x00,0x00,0xD8,0x00,0x00,0x9C,0x00,0x01,0x88,0x00,0x03,0x0F,0xC0,0x07,0xFF,0xE0,0x07,0xF8,0x00,0x06,0x08,0x00,0x00,0x0C,0x80,0x01,0x0C,0xE0,0x03,0x0C,0x70,0x06,0x0C,0x38,0x0E,0x0C,0x18,0x0C,0x5C,0x18,0x08,0x7C,0x00,0x00,0x38,0x00],"西":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0xFF,0xC0,0x07,0xFC,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0xCC,0xF8,0x00,0xFF,0xFC,0x3F,0xC8,0x1C,0x18,0xC8,0x18,0x18,0x88,0x18,0x18,0x8F,0x98,0x09,0x83,0x18,0x09,0x00,0x38,0x0C,0x00,0x30,0x0C,0x3F,0x30,0x0F,0xFF,0xB0,0x0C,0x00,0xF0,0x04,0x00,0xE0,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00]} def font_show(font_con): for m in range(len(font_con)): font=font_rect1.get(font_con[m]) #根据读取到数据给我们的24*24点阵赋值 rect_list = [] * 24 for i in range(24): rect_list.append([] * 24) for k in range(len(font) // 3): row_list = rect_list[k] for j in range(3): for i in range(8): asc = font[k * 3 + j] flag = asc & KEYS row_list.append(flag) #根据获取到的24*24点阵信息,打印到控制台 j=0 for row in rect_list: k=0 for i in row: if i: #前景字符(即用来表示汉字笔画的输出字符) lcd.pixel((m%13)*24+k, (m//13)*24+j, 0xffffff) k=k+1 j=j+1 font="张磊到门卫处取东西取东西取张磊到门卫" font_show(font)[/mw_shl_code] 9、多屏显示 因每行显示13个汉字,满屏能显示10行,共130个汉字。所以以130个汉字为一屏,按A按钮显示下一屏,当无内容时,再按将显示“无信息” [mw_shl_code=python,true]from m5stack import * from m5ui import * from uiflow import * import binascii def first_index(my_list, elem): try: index = my_list.index(elem) + 1 except: index = 0 return index setScreenColor(0x222222) KEYS = [0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01] #初始化24*24的点阵位置,每个汉字需要24*24=256个点来表示 font_rect1={'班':[0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x7C,0x0F,0x8F,0xF0,0x1F,0x0C,0xC0,0x06,0x0C,0xC0,0x06,0x08,0xC0,0x06,0x68,0xC0,0x07,0xE8,0xF0,0x1F,0x6B,0xF8,0x0E,0x69,0xC0,0x06,0x18,0xC0,0x06,0x18,0xC0,0x06,0x90,0xC0,0x07,0x30,0xC0,0x1E,0x30,0xFE,0x78,0x6F,0xFE,0x30,0x60,0x00,0x00,0xC0,0x00,0x01,0x80,0x00,0x03,0x00,0x00,0x00,0x00,0x00],'主': [0x00,0x20,0x00,0x00,0x3C,0x00,0x00,0x1E,0x00,0x00,0x0E,0x00,0x00,0x04,0x00,0x00,0x00,0x80,0x00,0x0F,0xE0,0x00,0xFF,0xC0,0x03,0xF8,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x1F,0x80,0x00,0xFF,0x80,0x03,0xF8,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0xFC,0x00,0xFF,0xFE,0x7F,0xF8,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],'任':[0x00,0x00,0x00,0x01,0x00,0x00,0x01,0x80,0x40,0x03,0x80,0xF0,0x03,0x03,0xE0,0x07,0x0F,0x00,0x06,0x7F,0x00,0x0C,0x03,0x00,0x0E,0x03,0x00,0x1E,0x03,0x00,0x32,0x03,0x3E,0x22,0x0F,0xFF,0x43,0xFF,0x00,0x82,0x83,0x00,0x02,0x03,0x00,0x06,0x03,0x00,0x06,0x03,0x00,0x06,0x03,0x00,0x06,0x07,0xF8,0x06,0x7F,0xF8,0x06,0x20,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],'助': [0x00,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0xC0,0x00,0x00,0xC0,0x01,0xE0,0xC0,0x1F,0x61,0x80,0x0C,0x61,0x80,0x0C,0x61,0xB8,0x0F,0x43,0xFC,0x0F,0x5F,0x98,0x0C,0x41,0x18,0x0C,0xC3,0x18,0x0F,0xC3,0x18,0x0C,0xC2,0x18,0x0C,0xD6,0x30,0x0C,0xE4,0x30,0x0F,0x8C,0x30,0x3E,0x08,0x30,0x78,0x19,0xF0,0x20,0x30,0xE0,0x00,0x60,0xE0,0x00,0xC0,0x40,0x00,0x00,0x00,0x00,0x00,0x00],'手': [0x00,0x02,0x00,0x00,0x07,0x80,0x00,0x1F,0x00,0x00,0xF8,0x00,0x01,0xF0,0x00,0x00,0x18,0x00,0x00,0x1F,0x80,0x00,0xFF,0x80,0x01,0xF8,0x00,0x00,0x08,0x00,0x00,0x08,0xFC,0x00,0x3F,0xFE,0x3F,0xFC,0x0C,0x7E,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x1C,0x00,0x00,0x18,0x00,0x00,0xF8,0x00,0x00,0x78,0x00,0x00,0x30,0x00],"张":[0x00,0x10,0x00,0x00,0x1C,0x00,0x01,0x98,0x60,0x0F,0xD8,0xE0,0x1D,0x98,0xC0,0x01,0x19,0x80,0x03,0x19,0x00,0x03,0x1A,0x00,0x1F,0x1C,0x00,0x18,0x18,0xF0,0x18,0x1F,0xF0,0x18,0xFE,0x00,0x1F,0x1A,0x00,0x3B,0x19,0x00,0x33,0x19,0x80,0x03,0x18,0xC0,0x03,0x18,0xE0,0x03,0x18,0x7C,0x06,0x1B,0x3F,0x1E,0x1E,0x08,0x1E,0x3C,0x00,0x0C,0x38,0x00,0x00,0x10,0x00,0x00,0x00,0x00],"磊":[0x00,0x00,0x00,0x00,0x0F,0xE0,0x00,0xFF,0x80,0x00,0x18,0x00,0x00,0x38,0x00,0x00,0x33,0xE0,0x00,0x7E,0xE0,0x00,0xE0,0xC0,0x01,0xE1,0xC0,0x07,0x7F,0xC0,0x0C,0x30,0x00,0x00,0x00,0x1E,0x00,0x7F,0xFE,0x0F,0xF3,0xC0,0x01,0x80,0xC0,0x01,0x81,0x80,0x03,0x73,0xFC,0x07,0xF3,0xDC,0x06,0x37,0x1C,0x0E,0x6F,0x18,0x1F,0xFB,0xFC,0x62,0x23,0x80,0x02,0x01,0x00,0x00,0x00,0x00],"到":[0x00,0x00,0x38,0x00,0x00,0x18,0x00,0x70,0x18,0x03,0xF0,0x18,0x1F,0xC0,0x18,0x01,0x83,0x18,0x03,0x01,0x98,0x06,0x31,0x18,0x0C,0x79,0x18,0x1F,0xD9,0x18,0x1F,0x99,0x18,0x11,0x81,0x18,0x01,0xA1,0x98,0x03,0xF1,0x98,0x0F,0x83,0x18,0x01,0x81,0x18,0x01,0x98,0x18,0x01,0xF0,0x18,0x7F,0x80,0x18,0x7C,0x00,0x98,0x10,0x00,0x78,0x00,0x00,0x78,0x00,0x00,0x38,0x00,0x00,0x00],"门":[0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x40,0x01,0xC7,0xF0,0x00,0xDE,0x70,0x0C,0x00,0x30,0x0E,0x00,0x30,0x06,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x0C,0x00,0x30,0x0C,0x00,0x30,0x0C,0x01,0xF0,0x0C,0x00,0xF0,0x04,0x00,0x70,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00],"卫":[0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x0F,0xE0,0x0F,0xFF,0xE0,0x0F,0xE0,0xC0,0x00,0x70,0xC0,0x00,0x70,0xC0,0x00,0x71,0xC0,0x00,0x71,0x80,0x00,0x65,0x80,0x00,0x67,0x80,0x00,0x63,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x63,0xF8,0x03,0xFF,0xFC,0xFF,0xC0,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"处":[0x00,0x00,0x00,0x00,0x06,0x00,0x02,0x07,0x00,0x03,0x03,0x00,0x03,0x02,0x00,0x03,0x02,0x00,0x06,0x02,0x00,0x06,0xE2,0x00,0x07,0xE3,0xE0,0x0C,0x62,0x70,0x08,0xC2,0x38,0x1C,0xC2,0x18,0x37,0x86,0x00,0x23,0x86,0x00,0x01,0x86,0x00,0x03,0xC6,0x00,0x06,0x32,0x00,0x0C,0x18,0x00,0x18,0x0E,0x00,0x30,0x07,0xC0,0x40,0x03,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"取":[0x00,0x00,0x00,0x00,0xF8,0x00,0x1F,0xF8,0x00,0x3E,0xC0,0x00,0x0C,0xC0,0x60,0x0C,0xC3,0xF0,0x0D,0xDF,0xE0,0x0F,0xC0,0xE0,0x0C,0xD8,0xC0,0x0C,0xCC,0xC0,0x0F,0xC6,0xC0,0x0F,0xC3,0x80,0x08,0xC1,0x80,0x08,0xF1,0x80,0x09,0xC3,0xC0,0x0F,0xC6,0xE0,0xFC,0xDC,0x78,0x60,0xF0,0x3F,0x00,0xC0,0x1E,0x00,0xC0,0x00,0x00,0xC0,0x00,0x00,0xC0,0x00,0x00,0x80,0x00,0x00,0x00,0x00],"东":[0x00,0x10,0x00,0x00,0x18,0x00,0x00,0x1C,0x00,0x00,0x18,0x00,0x00,0x30,0x00,0x00,0x33,0xF0,0x00,0x7F,0xF0,0x0F,0xF8,0x00,0x06,0x40,0x00,0x00,0xD8,0x00,0x00,0x9C,0x00,0x01,0x88,0x00,0x03,0x0F,0xC0,0x07,0xFF,0xE0,0x07,0xF8,0x00,0x06,0x08,0x00,0x00,0x0C,0x80,0x01,0x0C,0xE0,0x03,0x0C,0x70,0x06,0x0C,0x38,0x0E,0x0C,0x18,0x0C,0x5C,0x18,0x08,0x7C,0x00,0x00,0x38,0x00],"西":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0xFF,0xC0,0x07,0xFC,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0xCC,0xF8,0x00,0xFF,0xFC,0x3F,0xC8,0x1C,0x18,0xC8,0x18,0x18,0x88,0x18,0x18,0x8F,0x98,0x09,0x83,0x18,0x09,0x00,0x38,0x0C,0x00,0x30,0x0C,0x3F,0x30,0x0F,0xFF,0xB0,0x0C,0x00,0xF0,0x04,0x00,0xE0,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00],"无":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x3F,0x00,0x03,0xF8,0x00,0x00,0x70,0x00,0x00,0x70,0x00,0x00,0x61,0x80,0x00,0x6F,0xC0,0x00,0xFF,0x00,0x0F,0xF0,0x00,0x06,0x58,0x00,0x00,0xD8,0x00,0x00,0xD8,0x00,0x01,0x98,0x00,0x01,0x98,0x04,0x03,0x18,0x04,0x07,0x18,0x04,0x0E,0x18,0x0E,0x1C,0x0F,0xFE,0x30,0x07,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"信":[0x00,0x00,0x00,0x03,0x07,0x80,0x03,0x83,0x80,0x03,0x81,0x80,0x03,0x00,0x08,0x07,0x01,0xFE,0x06,0xFF,0xFE,0x0C,0x60,0x00,0x0E,0x00,0xC0,0x1E,0x0F,0xE0,0x32,0x0C,0x00,0x62,0x00,0x00,0x42,0x07,0xC0,0x82,0x0E,0x00,0x02,0x00,0x00,0x02,0x01,0xF0,0x02,0x1F,0xF8,0x06,0x18,0x70,0x06,0x18,0x60,0x06,0x18,0xE0,0x06,0x0F,0xE0,0x06,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"息":[0x00,0x30,0x00,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x20,0x00,0x00,0x4F,0x80,0x03,0xFB,0xC0,0x01,0x81,0x80,0x01,0x99,0x80,0x01,0xF9,0x80,0x01,0x81,0x80,0x01,0x9F,0x00,0x01,0xFB,0x00,0x01,0x83,0x00,0x01,0x8F,0x00,0x01,0xFF,0x00,0x00,0x83,0x7C,0x08,0x18,0x1C,0x0B,0x1C,0x0E,0x19,0x0C,0x00,0x39,0x80,0x40,0x38,0x80,0x60,0x10,0xE0,0x38,0x00,0x7F,0xF8,0x00,0x1F,0xF0] } def font_show(font_con): for m in range(len(font_con)): font=font_rect1.get(font_con[m]) #根据读取到数据给我们的24*24点阵赋值 rect_list = [] * 24 for i in range(24): rect_list.append([] * 24) for k in range(len(font) // 3): row_list = rect_list[k] for j in range(3): for i in range(8): asc = font[k * 3 + j] flag = asc & KEYS row_list.append(flag) #根据获取到的24*24点阵信息,打印到控制台 j=0 for row in rect_list: k=0 for i in row: if i: #前景字符(即用来表示汉字笔画的输出字符) lcd.pixel((m%13)*24+k, (m//13)*24+j, 0xffffff) k=k+1 j=j+1 font_first="张磊到门卫处取东西取东西取张磊到门卫张磊到门卫处取东西取东西取张磊到门卫张张磊到门卫处取东西取东西取张磊到门卫张磊到门卫处取东西取东西取张磊到门卫张磊到门卫处取东西取东西取张磊到门卫张磊到门卫处取东西取东西张磊到门卫处取东西取东西取张磊到门卫张磊到门卫处取东西取东西取张磊到门卫张磊到门卫处取东西取东西取张磊到门卫取张磊到门卫" def buttonA_wasPressed(): # global params global font_first lcd.fill(0x000000) if len(font_first)>130: font_first=font_first[131:] font_show(font_first) else: font_show("无信息") pass btnA.wasPressed(buttonA_wasPressed) font_show(font_first)[/mw_shl_code] 10、物联+信息显示 将学生姓名利用数字进行编码,如“01”为“张磊”同学,利用物联发送数字代码,M5Stack接收后对应解析并显示。 [mw_shl_code=python,true]from m5stack import * from m5ui import * from uiflow import * import binascii import wifiCfg from m5mqtt import M5mqtt setScreenColor(0x222222) m5mqtt = M5mqtt('j88LywSZR', 'iot.dfrobot.com.cn', 1883, 'RNZYsQIWg', 'gHWLswIWgz', 300) wifiCfg.screenShow() wifiCfg.autoConnect(lcdShow=True) KEYS = [0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01] #初始化24*24的点阵位置,每个汉字需要24*24=256个点来表示 font_rect1={'班':[0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x7C,0x0F,0x8F,0xF0,0x1F,0x0C,0xC0,0x06,0x0C,0xC0,0x06,0x08,0xC0,0x06,0x68,0xC0,0x07,0xE8,0xF0,0x1F,0x6B,0xF8,0x0E,0x69,0xC0,0x06,0x18,0xC0,0x06,0x18,0xC0,0x06,0x90,0xC0,0x07,0x30,0xC0,0x1E,0x30,0xFE,0x78,0x6F,0xFE,0x30,0x60,0x00,0x00,0xC0,0x00,0x01,0x80,0x00,0x03,0x00,0x00,0x00,0x00,0x00],'主': [0x00,0x20,0x00,0x00,0x3C,0x00,0x00,0x1E,0x00,0x00,0x0E,0x00,0x00,0x04,0x00,0x00,0x00,0x80,0x00,0x0F,0xE0,0x00,0xFF,0xC0,0x03,0xF8,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x1F,0x80,0x00,0xFF,0x80,0x03,0xF8,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0xFC,0x00,0xFF,0xFE,0x7F,0xF8,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],'任':[0x00,0x00,0x00,0x01,0x00,0x00,0x01,0x80,0x40,0x03,0x80,0xF0,0x03,0x03,0xE0,0x07,0x0F,0x00,0x06,0x7F,0x00,0x0C,0x03,0x00,0x0E,0x03,0x00,0x1E,0x03,0x00,0x32,0x03,0x3E,0x22,0x0F,0xFF,0x43,0xFF,0x00,0x82,0x83,0x00,0x02,0x03,0x00,0x06,0x03,0x00,0x06,0x03,0x00,0x06,0x03,0x00,0x06,0x07,0xF8,0x06,0x7F,0xF8,0x06,0x20,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],'助': [0x00,0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0xC0,0x00,0x00,0xC0,0x01,0xE0,0xC0,0x1F,0x61,0x80,0x0C,0x61,0x80,0x0C,0x61,0xB8,0x0F,0x43,0xFC,0x0F,0x5F,0x98,0x0C,0x41,0x18,0x0C,0xC3,0x18,0x0F,0xC3,0x18,0x0C,0xC2,0x18,0x0C,0xD6,0x30,0x0C,0xE4,0x30,0x0F,0x8C,0x30,0x3E,0x08,0x30,0x78,0x19,0xF0,0x20,0x30,0xE0,0x00,0x60,0xE0,0x00,0xC0,0x40,0x00,0x00,0x00,0x00,0x00,0x00],'手': [0x00,0x02,0x00,0x00,0x07,0x80,0x00,0x1F,0x00,0x00,0xF8,0x00,0x01,0xF0,0x00,0x00,0x18,0x00,0x00,0x1F,0x80,0x00,0xFF,0x80,0x01,0xF8,0x00,0x00,0x08,0x00,0x00,0x08,0xFC,0x00,0x3F,0xFE,0x3F,0xFC,0x0C,0x7E,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x1C,0x00,0x00,0x18,0x00,0x00,0xF8,0x00,0x00,0x78,0x00,0x00,0x30,0x00],"张":[0x00,0x10,0x00,0x00,0x1C,0x00,0x01,0x98,0x60,0x0F,0xD8,0xE0,0x1D,0x98,0xC0,0x01,0x19,0x80,0x03,0x19,0x00,0x03,0x1A,0x00,0x1F,0x1C,0x00,0x18,0x18,0xF0,0x18,0x1F,0xF0,0x18,0xFE,0x00,0x1F,0x1A,0x00,0x3B,0x19,0x00,0x33,0x19,0x80,0x03,0x18,0xC0,0x03,0x18,0xE0,0x03,0x18,0x7C,0x06,0x1B,0x3F,0x1E,0x1E,0x08,0x1E,0x3C,0x00,0x0C,0x38,0x00,0x00,0x10,0x00,0x00,0x00,0x00],"磊":[0x00,0x00,0x00,0x00,0x0F,0xE0,0x00,0xFF,0x80,0x00,0x18,0x00,0x00,0x38,0x00,0x00,0x33,0xE0,0x00,0x7E,0xE0,0x00,0xE0,0xC0,0x01,0xE1,0xC0,0x07,0x7F,0xC0,0x0C,0x30,0x00,0x00,0x00,0x1E,0x00,0x7F,0xFE,0x0F,0xF3,0xC0,0x01,0x80,0xC0,0x01,0x81,0x80,0x03,0x73,0xFC,0x07,0xF3,0xDC,0x06,0x37,0x1C,0x0E,0x6F,0x18,0x1F,0xFB,0xFC,0x62,0x23,0x80,0x02,0x01,0x00,0x00,0x00,0x00],"到":[0x00,0x00,0x38,0x00,0x00,0x18,0x00,0x70,0x18,0x03,0xF0,0x18,0x1F,0xC0,0x18,0x01,0x83,0x18,0x03,0x01,0x98,0x06,0x31,0x18,0x0C,0x79,0x18,0x1F,0xD9,0x18,0x1F,0x99,0x18,0x11,0x81,0x18,0x01,0xA1,0x98,0x03,0xF1,0x98,0x0F,0x83,0x18,0x01,0x81,0x18,0x01,0x98,0x18,0x01,0xF0,0x18,0x7F,0x80,0x18,0x7C,0x00,0x98,0x10,0x00,0x78,0x00,0x00,0x78,0x00,0x00,0x38,0x00,0x00,0x00],"门":[0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x40,0x01,0xC7,0xF0,0x00,0xDE,0x70,0x0C,0x00,0x30,0x0E,0x00,0x30,0x06,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x0C,0x00,0x30,0x0C,0x00,0x30,0x0C,0x01,0xF0,0x0C,0x00,0xF0,0x04,0x00,0x70,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00],"卫":[0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x0F,0xE0,0x0F,0xFF,0xE0,0x0F,0xE0,0xC0,0x00,0x70,0xC0,0x00,0x70,0xC0,0x00,0x71,0xC0,0x00,0x71,0x80,0x00,0x65,0x80,0x00,0x67,0x80,0x00,0x63,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x63,0xF8,0x03,0xFF,0xFC,0xFF,0xC0,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"处":[0x00,0x00,0x00,0x00,0x06,0x00,0x02,0x07,0x00,0x03,0x03,0x00,0x03,0x02,0x00,0x03,0x02,0x00,0x06,0x02,0x00,0x06,0xE2,0x00,0x07,0xE3,0xE0,0x0C,0x62,0x70,0x08,0xC2,0x38,0x1C,0xC2,0x18,0x37,0x86,0x00,0x23,0x86,0x00,0x01,0x86,0x00,0x03,0xC6,0x00,0x06,0x32,0x00,0x0C,0x18,0x00,0x18,0x0E,0x00,0x30,0x07,0xC0,0x40,0x03,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"取":[0x00,0x00,0x00,0x00,0xF8,0x00,0x1F,0xF8,0x00,0x3E,0xC0,0x00,0x0C,0xC0,0x60,0x0C,0xC3,0xF0,0x0D,0xDF,0xE0,0x0F,0xC0,0xE0,0x0C,0xD8,0xC0,0x0C,0xCC,0xC0,0x0F,0xC6,0xC0,0x0F,0xC3,0x80,0x08,0xC1,0x80,0x08,0xF1,0x80,0x09,0xC3,0xC0,0x0F,0xC6,0xE0,0xFC,0xDC,0x78,0x60,0xF0,0x3F,0x00,0xC0,0x1E,0x00,0xC0,0x00,0x00,0xC0,0x00,0x00,0xC0,0x00,0x00,0x80,0x00,0x00,0x00,0x00],"东":[0x00,0x10,0x00,0x00,0x18,0x00,0x00,0x1C,0x00,0x00,0x18,0x00,0x00,0x30,0x00,0x00,0x33,0xF0,0x00,0x7F,0xF0,0x0F,0xF8,0x00,0x06,0x40,0x00,0x00,0xD8,0x00,0x00,0x9C,0x00,0x01,0x88,0x00,0x03,0x0F,0xC0,0x07,0xFF,0xE0,0x07,0xF8,0x00,0x06,0x08,0x00,0x00,0x0C,0x80,0x01,0x0C,0xE0,0x03,0x0C,0x70,0x06,0x0C,0x38,0x0E,0x0C,0x18,0x0C,0x5C,0x18,0x08,0x7C,0x00,0x00,0x38,0x00],"西":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0xFF,0xC0,0x07,0xFC,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0xCC,0xF8,0x00,0xFF,0xFC,0x3F,0xC8,0x1C,0x18,0xC8,0x18,0x18,0x88,0x18,0x18,0x8F,0x98,0x09,0x83,0x18,0x09,0x00,0x38,0x0C,0x00,0x30,0x0C,0x3F,0x30,0x0F,0xFF,0xB0,0x0C,0x00,0xF0,0x04,0x00,0xE0,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00],"无":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x3F,0x00,0x03,0xF8,0x00,0x00,0x70,0x00,0x00,0x70,0x00,0x00,0x61,0x80,0x00,0x6F,0xC0,0x00,0xFF,0x00,0x0F,0xF0,0x00,0x06,0x58,0x00,0x00,0xD8,0x00,0x00,0xD8,0x00,0x01,0x98,0x00,0x01,0x98,0x04,0x03,0x18,0x04,0x07,0x18,0x04,0x0E,0x18,0x0E,0x1C,0x0F,0xFE,0x30,0x07,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"信":[0x00,0x00,0x00,0x03,0x07,0x80,0x03,0x83,0x80,0x03,0x81,0x80,0x03,0x00,0x08,0x07,0x01,0xFE,0x06,0xFF,0xFE,0x0C,0x60,0x00,0x0E,0x00,0xC0,0x1E,0x0F,0xE0,0x32,0x0C,0x00,0x62,0x00,0x00,0x42,0x07,0xC0,0x82,0x0E,0x00,0x02,0x00,0x00,0x02,0x01,0xF0,0x02,0x1F,0xF8,0x06,0x18,0x70,0x06,0x18,0x60,0x06,0x18,0xE0,0x06,0x0F,0xE0,0x06,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"息":[0x00,0x30,0x00,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x20,0x00,0x00,0x4F,0x80,0x03,0xFB,0xC0,0x01,0x81,0x80,0x01,0x99,0x80,0x01,0xF9,0x80,0x01,0x81,0x80,0x01,0x9F,0x00,0x01,0xFB,0x00,0x01,0x83,0x00,0x01,0x8F,0x00,0x01,0xFF,0x00,0x00,0x83,0x7C,0x08,0x18,0x1C,0x0B,0x1C,0x0E,0x19,0x0C,0x00,0x39,0x80,0x40,0x38,0x80,0x60,0x10,0xE0,0x38,0x00,0x7F,0xF8,0x00,0x1F,0xF0] } def font_show(font_con): for m in range(len(font_con)): font=font_rect1.get(font_con[m]) #根据读取到数据给我们的24*24点阵赋值 rect_list = [] * 24 for i in range(24): rect_list.append([] * 24) for k in range(len(font) // 3): row_list = rect_list[k] for j in range(3): for i in range(8): asc = font[k * 3 + j] flag = asc & KEYS row_list.append(flag) #根据获取到的24*24点阵信息,打印到控制台 j=0 for row in rect_list: k=0 for i in row: if i: #前景字符(即用来表示汉字笔画的输出字符) lcd.pixel((m%13)*24+k, (m//13)*24+j, 0xffffff) k=k+1 j=j+1 font_first="" def buttonA_wasPressed(): # global params global font_first lcd.fill(0x000000) if len(font_first)>130: font_first=font_first[131:] font_show(font_first) else: font_show("无信息") pass btnA.wasPressed(buttonA_wasPressed) def fun_j88LywSZR_(topic_data): # global params global font_first font_first=str(topic_data) if font_first[0:2]=="01": font_show("张磊") pass m5mqtt.subscribe(str('12IZ3JpWR'), fun_j88LywSZR_) def buttonB_wasPressed(): # global params if not (wifiCfg.wlan_sta.isconnected()): pass else: lcd.fill(0x000000) m5mqtt.publish(str('E1RcL1tZg'),str('已阅')) pass btnB.wasPressed(buttonB_wasPressed) setScreenColor(0xffff66) wifiCfg.doConnect('mxy', 'smj080823') while not (wifiCfg.wlan_sta.isconnected()): pass setScreenColor(0x663300) m5mqtt.start() lcd.fill(0x000000) [/mw_shl_code] 11、定义学生姓名字典、常用通知信息字典 常用通知信息字典:action={'01':'到门卫处取东西','02':'到门卫处取药品','03':'到门卫处取衣服','04':'到门卫处取水果','05':'到门卫处取课本','06':'到门卫处取牛奶','07':'到门卫处取身份证','08':'给家长回电话'} 对于提取的字模数据,可以使用Word中的替换功能,进行格式转换。 [mw_shl_code=python,true]from m5stack import * from m5ui import * from uiflow import * import binascii import wifiCfg from m5mqtt import M5mqtt setScreenColor(0x222222) m5mqtt = M5mqtt('j88LywSZR', 'iot.dfrobot.com.cn', 1883, 'RNZYsQIWg', 'gHWLswIWgz', 300) wifiCfg.screenShow() wifiCfg.autoConnect(lcdShow=True) font_rect1={"张":[0x00,0x10,0x00,0x00,0x1C,0x00,0x01,0x98,0x60,0x0F,0xD8,0xE0,0x1D,0x98,0xC0,0x01,0x19,0x80,0x03,0x19,0x00,0x03,0x1A,0x00,0x1F,0x1C,0x00,0x18,0x18,0xF0,0x18,0x1F,0xF0,0x18,0xFE,0x00,0x1F,0x1A,0x00,0x3B,0x19,0x00,0x33,0x19,0x80,0x03,0x18,0xC0,0x03,0x18,0xE0,0x03,0x18,0x7C,0x06,0x1B,0x3F,0x1E,0x1E,0x08,0x1E,0x3C,0x00,0x0C,0x38,0x00,0x00,0x10,0x00,0x00,0x00,0x00],"磊":[0x00,0x00,0x00,0x00,0x0F,0xE0,0x00,0xFF,0x80,0x00,0x18,0x00,0x00,0x38,0x00,0x00,0x33,0xE0,0x00,0x7E,0xE0,0x00,0xE0,0xC0,0x01,0xE1,0xC0,0x07,0x7F,0xC0,0x0C,0x30,0x00,0x00,0x00,0x1E,0x00,0x7F,0xFE,0x0F,0xF3,0xC0,0x01,0x80,0xC0,0x01,0x81,0x80,0x03,0x73,0xFC,0x07,0xF3,0xDC,0x06,0x37,0x1C,0x0E,0x6F,0x18,0x1F,0xFB,0xFC,0x62,0x23,0x80,0x02,0x01,0x00,0x00,0x00,0x00],"到":[0x00,0x00,0x38,0x00,0x00,0x18,0x00,0x70,0x18,0x03,0xF0,0x18,0x1F,0xC0,0x18,0x01,0x83,0x18,0x03,0x01,0x98,0x06,0x31,0x18,0x0C,0x79,0x18,0x1F,0xD9,0x18,0x1F,0x99,0x18,0x11,0x81,0x18,0x01,0xA1,0x98,0x03,0xF1,0x98,0x0F,0x83,0x18,0x01,0x81,0x18,0x01,0x98,0x18,0x01,0xF0,0x18,0x7F,0x80,0x18,0x7C,0x00,0x98,0x10,0x00,0x78,0x00,0x00,0x78,0x00,0x00,0x38,0x00,0x00,0x00],"门":[0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x40,0x01,0xC7,0xF0,0x00,0xDE,0x70,0x0C,0x00,0x30,0x0E,0x00,0x30,0x06,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x0C,0x00,0x30,0x0C,0x00,0x30,0x0C,0x01,0xF0,0x0C,0x00,0xF0,0x04,0x00,0x70,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00],"卫":[0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x0F,0xE0,0x0F,0xFF,0xE0,0x0F,0xE0,0xC0,0x00,0x70,0xC0,0x00,0x70,0xC0,0x00,0x71,0xC0,0x00,0x71,0x80,0x00,0x65,0x80,0x00,0x67,0x80,0x00,0x63,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x63,0xF8,0x03,0xFF,0xFC,0xFF,0xC0,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"处":[0x00,0x00,0x00,0x00,0x06,0x00,0x02,0x07,0x00,0x03,0x03,0x00,0x03,0x02,0x00,0x03,0x02,0x00,0x06,0x02,0x00,0x06,0xE2,0x00,0x07,0xE3,0xE0,0x0C,0x62,0x70,0x08,0xC2,0x38,0x1C,0xC2,0x18,0x37,0x86,0x00,0x23,0x86,0x00,0x01,0x86,0x00,0x03,0xC6,0x00,0x06,0x32,0x00,0x0C,0x18,0x00,0x18,0x0E,0x00,0x30,0x07,0xC0,0x40,0x03,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"取":[0x00,0x00,0x00,0x00,0xF8,0x00,0x1F,0xF8,0x00,0x3E,0xC0,0x00,0x0C,0xC0,0x60,0x0C,0xC3,0xF0,0x0D,0xDF,0xE0,0x0F,0xC0,0xE0,0x0C,0xD8,0xC0,0x0C,0xCC,0xC0,0x0F,0xC6,0xC0,0x0F,0xC3,0x80,0x08,0xC1,0x80,0x08,0xF1,0x80,0x09,0xC3,0xC0,0x0F,0xC6,0xE0,0xFC,0xDC,0x78,0x60,0xF0,0x3F,0x00,0xC0,0x1E,0x00,0xC0,0x00,0x00,0xC0,0x00,0x00,0xC0,0x00,0x00,0x80,0x00,0x00,0x00,0x00],"东":[0x00,0x10,0x00,0x00,0x18,0x00,0x00,0x1C,0x00,0x00,0x18,0x00,0x00,0x30,0x00,0x00,0x33,0xF0,0x00,0x7F,0xF0,0x0F,0xF8,0x00,0x06,0x40,0x00,0x00,0xD8,0x00,0x00,0x9C,0x00,0x01,0x88,0x00,0x03,0x0F,0xC0,0x07,0xFF,0xE0,0x07,0xF8,0x00,0x06,0x08,0x00,0x00,0x0C,0x80,0x01,0x0C,0xE0,0x03,0x0C,0x70,0x06,0x0C,0x38,0x0E,0x0C,0x18,0x0C,0x5C,0x18,0x08,0x7C,0x00,0x00,0x38,0x00],"西":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0xFF,0xC0,0x07,0xFC,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0xCC,0xF8,0x00,0xFF,0xFC,0x3F,0xC8,0x1C,0x18,0xC8,0x18,0x18,0x88,0x18,0x18,0x8F,0x98,0x09,0x83,0x18,0x09,0x00,0x38,0x0C,0x00,0x30,0x0C,0x3F,0x30,0x0F,0xFF,0xB0,0x0C,0x00,0xF0,0x04,0x00,0xE0,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00],"无":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x3F,0x00,0x03,0xF8,0x00,0x00,0x70,0x00,0x00,0x70,0x00,0x00,0x61,0x80,0x00,0x6F,0xC0,0x00,0xFF,0x00,0x0F,0xF0,0x00,0x06,0x58,0x00,0x00,0xD8,0x00,0x00,0xD8,0x00,0x01,0x98,0x00,0x01,0x98,0x04,0x03,0x18,0x04,0x07,0x18,0x04,0x0E,0x18,0x0E,0x1C,0x0F,0xFE,0x30,0x07,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"信":[0x00,0x00,0x00,0x03,0x07,0x80,0x03,0x83,0x80,0x03,0x81,0x80,0x03,0x00,0x08,0x07,0x01,0xFE,0x06,0xFF,0xFE,0x0C,0x60,0x00,0x0E,0x00,0xC0,0x1E,0x0F,0xE0,0x32,0x0C,0x00,0x62,0x00,0x00,0x42,0x07,0xC0,0x82,0x0E,0x00,0x02,0x00,0x00,0x02,0x01,0xF0,0x02,0x1F,0xF8,0x06,0x18,0x70,0x06,0x18,0x60,0x06,0x18,0xE0,0x06,0x0F,0xE0,0x06,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"息":[0x00,0x30,0x00,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x20,0x00,0x00,0x4F,0x80,0x03,0xFB,0xC0,0x01,0x81,0x80,0x01,0x99,0x80,0x01,0xF9,0x80,0x01,0x81,0x80,0x01,0x9F,0x00,0x01,0xFB,0x00,0x01,0x83,0x00,0x01,0x8F,0x00,0x01,0xFF,0x00,0x00,0x83,0x7C,0x08,0x18,0x1C,0x0B,0x1C,0x0E,0x19,0x0C,0x00,0x39,0x80,0x40,0x38,0x80,0x60,0x10,0xE0,0x38,0x00,0x7F,0xF8,0x00,0x1F,0xF0],"牛":[0x00,0x10,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,0x00,0x1C,0x00,0x00,0x18,0x00,0x03,0x98,0x00,0x03,0x9B,0xC0,0x03,0x3F,0xC0,0x03,0xFC,0x00,0x06,0x18,0x00,0x04,0x18,0x00,0x0C,0x18,0xFC,0x00,0x3F,0xFE,0x0F,0xFC,0x00,0x7E,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00],"中":[0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x1B,0xF0,0x1D,0xFF,0xF8,0x0F,0xD0,0x78,0x0C,0x10,0x70,0x06,0x10,0x60,0x06,0x10,0x60,0x06,0x13,0xE0,0x07,0xFF,0xE0,0x07,0x10,0x00,0x02,0x10,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x10,0x00],"旭":[0x00,0x00,0x00,0x01,0xC0,0x00,0x00,0xC0,0x00,0x00,0xC0,0x00,0x00,0xC0,0x10,0x00,0xC3,0xFC,0x00,0xFB,0x1C,0x03,0xFB,0x18,0x1F,0xB3,0x18,0x09,0xB3,0xD8,0x01,0xB3,0x18,0x01,0x33,0x18,0x03,0x33,0x18,0x03,0x23,0xF8,0x06,0x23,0x30,0x06,0x20,0x12,0x0C,0x30,0x03,0x08,0x30,0x03,0x10,0x18,0x07,0x20,0x0F,0xFF,0x00,0x07,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"郭":[0x00,0xE0,0x00,0x00,0x60,0x00,0x00,0x28,0x00,0x01,0xFC,0x18,0x1F,0x82,0x7C,0x08,0x33,0xF8,0x07,0xFB,0x30,0x06,0x33,0x20,0x02,0xE3,0x60,0x03,0x03,0x40,0x00,0x73,0x30,0x0F,0xBB,0x18,0x06,0x63,0x1C,0x00,0xC3,0x0C,0x00,0xFB,0x0C,0x07,0xC3,0x7C,0x3F,0xC3,0x1C,0x38,0xC3,0x08,0x00,0xC3,0x00,0x03,0xC3,0x00,0x01,0xC3,0x00,0x00,0x83,0x00,0x00,0x03,0x00,0x00,0x03,0x00],"佳":[0x00,0x02,0x00,0x01,0x03,0x00,0x01,0x83,0x80,0x01,0xC3,0x00,0x01,0x83,0x00,0x03,0x83,0x20,0x03,0x03,0xF0,0x06,0x1F,0x80,0x06,0x03,0x00,0x0F,0x03,0x18,0x1B,0x03,0xFC,0x12,0x7F,0x00,0x22,0x63,0x00,0x42,0x03,0x00,0x02,0x03,0x60,0x02,0x0F,0xE0,0x02,0x1F,0x00,0x02,0x03,0x00,0x02,0x03,0x00,0x06,0x03,0xFE,0x06,0xFF,0xFE,0x06,0xE0,0x00,0x02,0x00,0x00,0x00,0x00,0x00],"美":[0x00,0x03,0x80,0x01,0xC3,0x80,0x00,0xC6,0x00,0x00,0x4C,0x00,0x00,0x07,0x80,0x00,0xFF,0x00,0x01,0xF0,0x00,0x00,0x16,0x00,0x00,0x7E,0x00,0x00,0xF0,0x00,0x00,0x17,0x80,0x01,0xFF,0x80,0x03,0xB0,0x00,0x00,0x30,0xF8,0x00,0x3F,0xFC,0x3F,0xF0,0x00,0x1C,0x38,0x00,0x00,0x6C,0x00,0x00,0x66,0x00,0x00,0xC3,0x80,0x03,0x81,0xE0,0x0F,0x00,0xFC,0x00,0x00,0x7E,0x00,0x00,0x00],"赛":[0x00,0x30,0x00,0x00,0x18,0xC0,0x00,0x3F,0xE0,0x0F,0xE8,0x70,0x0C,0x8C,0xC0,0x18,0xFE,0x00,0x1B,0xC8,0x00,0x00,0x5E,0x00,0x01,0xF8,0x00,0x00,0x4B,0xC0,0x00,0xFF,0xC0,0x0F,0x86,0x00,0x01,0x8F,0x00,0x03,0xFF,0xC0,0x07,0x86,0xF0,0x0D,0xB6,0x7E,0x19,0xB6,0x38,0x31,0xA6,0x00,0x01,0xA6,0x00,0x00,0x74,0x00,0x00,0x4C,0x00,0x01,0x86,0x00,0x03,0x07,0x00,0x00,0x00,0x00],"楠":[0x04,0x03,0x00,0x07,0x03,0x80,0x03,0x03,0x80,0x03,0x03,0x00,0x02,0x03,0x00,0x02,0x02,0x60,0x02,0x07,0xE0,0x02,0x1F,0x80,0x03,0xC4,0x00,0x3F,0x04,0xF8,0x7E,0x1F,0x9C,0x06,0x79,0x8C,0x0F,0x49,0x0C,0x0F,0xCF,0x8C,0x1F,0x5E,0x0C,0x36,0x46,0x8C,0x26,0x7F,0xDC,0x46,0x7E,0x18,0x86,0x46,0x18,0x06,0x46,0x78,0x06,0x06,0x78,0x06,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00],"志":[0x00,0x30,0x00,0x00,0x38,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x1B,0xE0,0x00,0x7F,0xC0,0x07,0xF8,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x1F,0x00,0x00,0xFF,0x80,0x03,0xE0,0x00,0x00,0x00,0x00,0x00,0x30,0x38,0x1A,0x18,0x3C,0x1B,0x1C,0x0C,0x3B,0x08,0x84,0x31,0x00,0x80,0x31,0x80,0xC0,0x20,0xC0,0x70,0x00,0x7F,0xF8,0x00,0x3F,0xF0,0x00,0x00,0x00],"强":[0x00,0x00,0x00,0x00,0x00,0x60,0x03,0x87,0xF0,0x1F,0xDC,0xE0,0x09,0x98,0xC0,0x01,0x18,0xC0,0x03,0x0F,0xC0,0x03,0x0B,0x00,0x1F,0x03,0x00,0x18,0x03,0xF8,0x18,0x7F,0x3C,0x10,0x33,0x38,0x3F,0x32,0x70,0x3B,0x37,0xE0,0x23,0x1F,0x00,0x03,0x03,0x40,0x03,0x03,0x70,0x03,0x03,0xF8,0x03,0x7F,0x98,0x1E,0x7C,0x1C,0x0E,0x20,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"李":[0x00,0x60,0x00,0x00,0x70,0x00,0x00,0x30,0x00,0x00,0x37,0x80,0x00,0xFF,0x80,0x0F,0xF0,0x00,0x00,0x78,0x00,0x00,0xEC,0x00,0x01,0xA7,0x00,0x03,0x23,0xE0,0x06,0x21,0xFD,0x0C,0x3E,0x60,0x1B,0xEE,0x01,0x00,0x08,0x00,0x00,0x70,0x70,0x00,0x3F,0xF8,0x0F,0xFC,0x38,0x7F,0x10,0x00,0x30,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0xB8,0x00,0x00,0xF0,0x00],"文":[0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x38,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x00,0x1F,0xE0,0x03,0xFC,0x00,0x0F,0x98,0x00,0x00,0x1C,0x00,0x07,0x18,0x00,0x01,0x98,0x00,0x00,0xD8,0x00,0x00,0x70,0x00,0x00,0x30,0x00,0x00,0x78,0x00,0x00,0xFC,0x00,0x03,0xCE,0x00,0x0F,0x07,0x80,0x7C,0x03,0xF0,0x00,0x01,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"轩":[0x02,0x00,0x00,0x03,0x00,0x00,0x03,0x00,0x00,0x03,0x00,0x00,0x02,0x00,0x30,0x07,0xE1,0xF8,0x1F,0xCF,0xE0,0x1C,0x01,0x80,0x0F,0x01,0x80,0x0B,0x01,0x80,0x09,0x01,0xBE,0x1B,0xE3,0xFE,0x3F,0x1F,0x80,0x31,0x01,0x80,0x01,0xE1,0x80,0x07,0xC1,0x80,0x7F,0x01,0x80,0x73,0x01,0x80,0x03,0x01,0x80,0x03,0x01,0x80,0x03,0x01,0x80,0x03,0x01,0x80,0x03,0x01,0x80,0x00,0x01,0x80],"涛":[0x00,0x04,0x00,0x00,0x07,0x00,0x00,0x06,0x00,0x0C,0x06,0xE0,0x0E,0x07,0xE0,0x07,0x3F,0x00,0x02,0x04,0x00,0x00,0x0F,0xC0,0x30,0x7F,0x00,0x38,0x08,0x30,0x18,0x1F,0xF8,0x01,0xFF,0x00,0x04,0xB1,0x80,0x04,0x31,0x9C,0x08,0x63,0xFE,0x18,0x7F,0x80,0x18,0xC0,0x80,0x31,0x99,0x80,0x31,0x1D,0x80,0x32,0x08,0x80,0x24,0x00,0x80,0x08,0x00,0xC0,0x00,0x07,0xC0,0x00,0x03,0x80],"鑫":[0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x6C,0x00,0x00,0xC7,0x00,0x01,0xBF,0xC0,0x03,0xF0,0xF8,0x06,0x3E,0x40,0x09,0xF0,0x00,0x00,0xB6,0x00,0x00,0xF9,0x80,0x00,0x7F,0x80,0x07,0x83,0x00,0x01,0x87,0x80,0x03,0x6C,0xE0,0x06,0x1F,0xF8,0x0F,0xF6,0x1F,0x1B,0x03,0xC0,0x63,0xCF,0x80,0x07,0x42,0xC0,0x0F,0xCA,0x80,0x07,0xE2,0x60,0x1F,0xBF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00],"凡":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x1F,0x00,0x03,0xFF,0x00,0x01,0x86,0x00,0x01,0x86,0x00,0x01,0x84,0x00,0x01,0x8C,0x00,0x01,0x8C,0x00,0x01,0xEC,0x00,0x01,0xFC,0x00,0x01,0xBC,0x00,0x01,0x8C,0x00,0x01,0x0C,0x00,0x03,0x0C,0x02,0x03,0x0C,0x02,0x06,0x0C,0x06,0x06,0x06,0x06,0x0C,0x07,0xFE,0x18,0x03,0xFE,0x30,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00],"侯":[0x00,0x00,0x00,0x03,0x00,0xC0,0x03,0x8F,0xE0,0x03,0x1D,0xC0,0x03,0x01,0x80,0x06,0x01,0xFC,0x06,0x1F,0xFC,0x0C,0xFC,0x00,0x0C,0x0C,0x00,0x1C,0x19,0xC0,0x36,0x1F,0xC0,0x26,0x36,0x00,0x46,0x66,0x00,0x86,0x06,0xFC,0x06,0x3F,0xFC,0x07,0xF6,0x00,0x06,0x07,0x00,0x06,0x0D,0x80,0x06,0x0C,0xC0,0x0C,0x18,0xF0,0x0C,0x30,0x7C,0x04,0xE0,0x3F,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,0x38,0x38,0x00,0x38,0x3C,0x00,0x18,0x1C,0x00,0x00,0x04,0x19,0x00,0x00,0x19,0x00,0x00,0x19,0x80,0x80,0x39,0x80,0xC0,0x30,0xC0,0x60,0x30,0xC0,0x78,0x00,0x70,0xF8,0x00,0x3F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"爽":[0x00,0x30,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x13,0x00,0x00,0x3F,0x80,0x03,0xFC,0x00,0x00,0x14,0xC0,0x01,0x97,0xC0,0x07,0xB3,0x00,0x03,0x37,0x80,0x07,0xBC,0xC0,0x0C,0xB4,0xC0,0x01,0xB3,0x80,0x07,0x37,0x80,0x03,0x3D,0xC0,0x05,0xF8,0xC0,0x08,0x6C,0x00,0x00,0x66,0x00,0x00,0xC3,0x00,0x01,0x83,0x80,0x07,0x01,0xE0,0x1C,0x00,0xFC,0x00,0x00,0x00,0x00,0x00,0x00],"寒":[0x00,0x30,0x00,0x00,0x38,0x00,0x00,0x18,0x00,0x00,0x03,0xF0,0x05,0xFF,0xF8,0x0F,0x8C,0x78,0x1C,0xC4,0x40,0x18,0xCF,0x00,0x13,0xFC,0x00,0x00,0xC4,0x00,0x00,0x5F,0x00,0x01,0xFC,0x00,0x00,0x44,0x40,0x00,0x7F,0xE0,0x0F,0xFC,0x00,0x04,0xC6,0x00,0x01,0x83,0x80,0x03,0x39,0xC0,0x06,0x18,0xF8,0x0C,0x08,0x7F,0x38,0x00,0x10,0x40,0x70,0x00,0x00,0x38,0x00,0x00,0x1C,0x00],"笑":[0x00,0x00,0x00,0x01,0x03,0x80,0x01,0x83,0x10,0x03,0x33,0xF8,0x03,0xF6,0x00,0x06,0x07,0x00,0x0D,0xC9,0xC0,0x18,0xD0,0xC0,0x10,0x0C,0x00,0x00,0x3E,0x00,0x01,0xF8,0x00,0x00,0x60,0x00,0x00,0x61,0xC0,0x00,0x7F,0xC0,0x1F,0xF0,0x00,0x0C,0x60,0x00,0x00,0xD0,0x00,0x00,0xC8,0x00,0x01,0x8E,0x00,0x03,0x07,0x80,0x06,0x03,0xE0,0x1C,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,0x00],"刘":[0x00,0x00,0x00,0x00,0x00,0x30,0x01,0x00,0x38,0x01,0xC0,0x38,0x00,0xE0,0x18,0x00,0x40,0x18,0x00,0x3D,0x10,0x03,0xF9,0x90,0x1F,0xE1,0x90,0x00,0x31,0x90,0x04,0x61,0x10,0x03,0x61,0x10,0x01,0xE1,0x10,0x00,0xC1,0x90,0x00,0xE1,0x98,0x01,0xF1,0x10,0x01,0x38,0x18,0x03,0x18,0x18,0x06,0x18,0x18,0x0C,0x00,0xD8,0x30,0x00,0x78,0x00,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x00],"衣":[0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x38,0x00,0x00,0x1C,0x00,0x00,0x00,0xC0,0x00,0x0F,0xE0,0x00,0xFF,0x80,0x0F,0xE0,0x00,0x00,0x30,0xC0,0x00,0x60,0xC0,0x00,0x71,0xC0,0x00,0xC9,0x00,0x01,0xC6,0x00,0x03,0x46,0x00,0x06,0x43,0x00,0x0C,0x41,0x80,0x18,0x40,0xE0,0x20,0x48,0xFC,0x00,0x78,0x7F,0x00,0xF0,0x00,0x00,0xE0,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"服":[0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0x97,0xE0,0x1F,0xDE,0xC0,0x19,0x98,0xC0,0x19,0x98,0xC0,0x19,0x9B,0x80,0x09,0x9B,0x80,0x0F,0x99,0x00,0x09,0x98,0xC0,0x09,0x9F,0xE0,0x19,0x9C,0xE0,0x1F,0x9C,0xC0,0x1D,0x96,0xC0,0x19,0x93,0xC0,0x19,0x91,0x80,0x11,0x91,0x80,0x31,0x93,0xC0,0x27,0x9E,0x70,0x63,0xB8,0x3E,0x43,0x30,0x1F,0x80,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"药":[0x00,0x03,0x00,0x01,0x83,0x80,0x00,0xC3,0x00,0x00,0xC7,0xF8,0x07,0xFF,0xF8,0x1F,0xC6,0x00,0x00,0x44,0x00,0x03,0x4F,0x00,0x03,0x03,0x80,0x03,0x43,0x00,0x06,0x66,0x70,0x0C,0xEF,0xF8,0x1F,0xC8,0x38,0x09,0x90,0x30,0x03,0x0C,0x30,0x07,0xE6,0x30,0x0F,0x83,0x30,0x0C,0x02,0x30,0x00,0x60,0x30,0x07,0x80,0x30,0x3E,0x01,0x70,0x1C,0x01,0xE0,0x00,0x00,0xE0,0x00,0x00,0x00],"品":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x03,0xFF,0xC0,0x01,0xE3,0xC0,0x01,0x83,0x80,0x00,0x83,0x00,0x00,0xC3,0x00,0x00,0xFF,0x00,0x00,0xF8,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x23,0xEF,0xFE,0x3E,0xE6,0x1C,0x30,0xE6,0x18,0x18,0xC6,0x38,0x18,0xC6,0x38,0x1F,0xC7,0xF8,0x1F,0x07,0xC0,0x18,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"课":[0x00,0x00,0x00,0x00,0x00,0x60,0x18,0x07,0xF0,0x0E,0x7E,0x38,0x06,0x66,0x30,0x02,0x67,0xF0,0x00,0x3E,0x60,0x00,0x26,0x60,0x0C,0x3F,0xC0,0x1E,0x3E,0x40,0xFC,0x06,0x70,0x6C,0x07,0xF8,0x0C,0xFE,0x00,0x0C,0xDF,0x00,0x0C,0x1F,0x80,0x09,0x36,0xC0,0x0E,0x26,0xF0,0x1E,0x66,0x7E,0x1C,0xC6,0x3F,0x19,0x86,0x00,0x12,0x06,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x00,0x00,0x00],"本":[0x00,0x70,0x00,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x33,0xC0,0x00,0x3F,0xC0,0x07,0xF8,0x00,0x03,0x30,0x00,0x00,0x78,0x00,0x00,0x78,0x00,0x00,0xF4,0x00,0x00,0xB6,0x00,0x01,0xB3,0x80,0x03,0x31,0xC0,0x06,0x30,0xF0,0x0C,0x3E,0x7C,0x19,0xFE,0x3F,0x31,0xF0,0x00,0x60,0x30,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x00,0x00],"奶":[0x00,0x00,0x00,0x03,0x00,0x00,0x01,0x80,0x00,0x01,0x80,0x00,0x01,0x80,0x78,0x01,0x03,0xF8,0x03,0x0F,0x30,0x03,0x63,0x30,0x03,0x63,0x20,0x03,0xE3,0x40,0x0F,0xE2,0x78,0xFE,0x46,0x5C,0x66,0xC6,0x0C,0x06,0xC4,0x08,0x03,0x8C,0x18,0x01,0x88,0x18,0x03,0xD8,0x18,0x06,0x70,0x18,0x0C,0x60,0xF0,0x10,0x00,0xF0,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"水":[0x00,0x20,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x18,0x40,0x00,0x10,0x60,0x00,0x10,0xF0,0x00,0x10,0xC0,0x01,0x91,0x80,0x07,0xD3,0x00,0x3F,0xDC,0x00,0x01,0x9C,0x00,0x01,0x96,0x00,0x03,0x13,0x00,0x03,0x11,0x80,0x06,0x10,0xE0,0x06,0x10,0xFC,0x0C,0x10,0x7F,0x18,0x10,0x10,0x30,0x38,0x00,0x00,0xF8,0x00,0x00,0x70,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"给":[0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x07,0x07,0x00,0x06,0x06,0x00,0x0C,0x86,0x00,0x0C,0xCE,0x00,0x19,0x8D,0x00,0x31,0x88,0x80,0x3F,0x18,0xE0,0x26,0x10,0x70,0x0C,0x30,0x3C,0x1F,0xE7,0x9F,0x3E,0x5F,0x00,0x38,0x80,0x00,0x00,0x01,0xC0,0x03,0xBF,0xE0,0x1E,0x30,0xE0,0x78,0x30,0xC0,0x60,0x30,0xC0,0x00,0x1F,0xC0,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"家":[0x00,0x70,0x00,0x00,0x38,0x00,0x00,0x18,0x60,0x04,0x1F,0xF8,0x0F,0xF0,0x78,0x0C,0x00,0x60,0x18,0x06,0x00,0x18,0xFE,0x00,0x10,0xF0,0x00,0x00,0x61,0x80,0x00,0xC3,0x80,0x03,0xC3,0x00,0x0E,0x64,0x00,0x00,0xF8,0x00,0x01,0xB6,0x00,0x02,0x73,0x00,0x04,0xF9,0xE0,0x01,0xD8,0xFE,0x03,0x18,0x78,0x0E,0x18,0x00,0x10,0x18,0x00,0x00,0xF8,0x00,0x00,0x70,0x00,0x00,0x00,0x00],"长":[0x00,0x00,0x00,0x03,0x82,0x00,0x01,0xC3,0x80,0x01,0xC3,0x80,0x00,0xC7,0x00,0x00,0xCC,0x00,0x00,0x88,0x00,0x00,0x90,0x00,0x00,0xE0,0x20,0x00,0xC7,0xF8,0x01,0xFF,0xF0,0x7F,0xE0,0x00,0x38,0xB0,0x00,0x00,0x98,0x00,0x00,0x8C,0x00,0x00,0x86,0x00,0x00,0x83,0x80,0x00,0x81,0xE0,0x01,0x98,0xFC,0x01,0xF0,0x7F,0x01,0xE0,0x00,0x03,0xC0,0x00,0x03,0x80,0x00,0x00,0x00,0x00],"回":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF8,0x33,0xFF,0xFC,0x3F,0x80,0x3C,0x18,0x00,0x38,0x18,0x0E,0x38,0x19,0xFF,0x30,0x18,0x86,0x30,0x18,0x86,0x30,0x08,0xCC,0x30,0x0C,0xFC,0x30,0x0C,0x40,0x30,0x0C,0x00,0x30,0x0C,0x1F,0x70,0x0F,0xFF,0xE0,0x0C,0x00,0xE0,0x0C,0x00,0x60,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"电":[0x00,0xC0,0x00,0x00,0x70,0x00,0x00,0x70,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x61,0x80,0x00,0x7F,0xC0,0x1F,0xE1,0xE0,0x0C,0x61,0xC0,0x0C,0x61,0x80,0x0C,0x7D,0x80,0x0D,0xE1,0x80,0x04,0x63,0x00,0x04,0x63,0x00,0x06,0xFF,0x00,0x07,0xE2,0x08,0x00,0x60,0x08,0x00,0x60,0x18,0x00,0x60,0x18,0x00,0x30,0x3C,0x00,0x3F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"话":[0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0xC0,0x07,0x80,0xE0,0x01,0x83,0xE0,0x00,0x87,0x80,0x00,0x1E,0x00,0x00,0x13,0x00,0x00,0x03,0x00,0x07,0x03,0x7E,0x3F,0x1F,0xFE,0xF6,0xFE,0x00,0x06,0x06,0x00,0x06,0x06,0x00,0x04,0x07,0xE0,0x04,0x3F,0xF0,0x04,0xB0,0x70,0x0F,0x30,0x60,0x0F,0x10,0x60,0x0E,0x1F,0xE0,0x0C,0x1F,0xE0,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00] } name={'01':'张磊','02':'郭涛','03':'张赛楠','04':'任志强','05':'刘旭强','06':'牛中旭','07':'郭佳美','08':'郭鑫凡','09':'李文轩','10':'侯心爽'} action={'01':'到门卫处取东西','02':'到门卫处取药品','03':'到门卫处取衣服','04':'到门卫处取水果','05':'到门卫处取课本','06':'到门卫处取牛奶','07':'给家长回电话'} KEYS = [0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01] #初始化24*24的点阵位置,每个汉字需要24*24=256个点来表示 def font_show(font_con): for m in range(len(font_con)): font=font_rect1.get(font_con[m]) #根据读取到数据给我们的24*24点阵赋值 rect_list = [] * 24 for i in range(24): rect_list.append([] * 24) for k in range(len(font) // 3): row_list = rect_list[k] for j in range(3): for i in range(8): asc = font[k * 3 + j] flag = asc & KEYS row_list.append(flag) #根据获取到的24*24点阵信息,打印到控制台 j=0 for row in rect_list: k=0 for i in row: if i: #前景字符(即用来表示汉字笔画的输出字符) lcd.pixel((m%13)*24+k, (m//13)*24+j, 0xffffff) k=k+1 j=j+1 font_first="" font_list=[] def buttonA_wasPressed(): # global params global font_first lcd.fill(0x000000) if len(font_first)>130: font_first=font_first[131:] font_show(font_first) else: font_show("无信息") pass btnA.wasPressed(buttonA_wasPressed) def fun_j88LywSZR_(topic_data): # global params global font_first,name,action list.append(str(topic_data)) font_first=str(topic_data) font_show(name.get(font_first[0:2])+action.get(font_first[2:4])) pass m5mqtt.subscribe(str('12IZ3JpWR'), fun_j88LywSZR_) def buttonB_wasPressed(): # global params if not (wifiCfg.wlan_sta.isconnected()): pass else: lcd.fill(0x000000) m5mqtt.publish(str('E1RcL1tZg'),str('已阅')) pass btnB.wasPressed(buttonB_wasPressed) setScreenColor(0xffff66) wifiCfg.doConnect('mxy', 'smj080823') while not (wifiCfg.wlan_sta.isconnected()): pass setScreenColor(0x663300) m5mqtt.start() lcd.fill(0x000000)[/mw_shl_code] 12、实现多条信息,分行显示 利用“C”按钮,当按下按钮时,将之前接收的多条消息,一次性展示。并在每条信息后补“空”,以实现每条信息分行显示。 [mw_shl_code=python,true]def buttonC_wasPressed(): # global params global font_first,list j=1 for i in list: font_first=font_first+str(j)+"条"+name.get(i[0:2])+action.get(i[2:4]) for k in range(13-len(font_first)%13): font_first=font_first+"空" j=j+1 font_show(font_first) pass btnC.wasPressed(buttonC_wasPressed)[/mw_shl_code] 13、最终M5Stack上完整代码 因时间有限,学生姓名编码只取了几个示例。 [mw_shl_code=python,true]from m5stack import * from m5ui import * from uiflow import * import binascii import wifiCfg from m5mqtt import M5mqtt setScreenColor(0x222222) m5mqtt = M5mqtt('j88LywSZR', 'iot.dfrobot.com.cn', 1883, 'RNZYsQIWg', 'gHWLswIWgz', 300) wifiCfg.screenShow() wifiCfg.autoConnect(lcdShow=True) font_rect1={"到":[0x00,0x00,0x38,0x00,0x00,0x18,0x00,0x70,0x18,0x03,0xF0,0x18,0x1F,0xC0,0x18,0x01,0x83,0x18,0x03,0x01,0x98,0x06,0x31,0x18,0x0C,0x79,0x18,0x1F,0xD9,0x18,0x1F,0x99,0x18,0x11,0x81,0x18,0x01,0xA1,0x98,0x03,0xF1,0x98,0x0F,0x83,0x18,0x01,0x81,0x18,0x01,0x98,0x18,0x01,0xF0,0x18,0x7F,0x80,0x18,0x7C,0x00,0x98,0x10,0x00,0x78,0x00,0x00,0x78,0x00,0x00,0x38,0x00,0x00,0x00],"门":[0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x40,0x01,0xC7,0xF0,0x00,0xDE,0x70,0x0C,0x00,0x30,0x0E,0x00,0x30,0x06,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x04,0x00,0x30,0x0C,0x00,0x30,0x0C,0x00,0x30,0x0C,0x01,0xF0,0x0C,0x00,0xF0,0x04,0x00,0x70,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00],"卫":[0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x0F,0xE0,0x0F,0xFF,0xE0,0x0F,0xE0,0xC0,0x00,0x70,0xC0,0x00,0x70,0xC0,0x00,0x71,0xC0,0x00,0x71,0x80,0x00,0x65,0x80,0x00,0x67,0x80,0x00,0x63,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x63,0xF8,0x03,0xFF,0xFC,0xFF,0xC0,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"处":[0x00,0x00,0x00,0x00,0x06,0x00,0x02,0x07,0x00,0x03,0x03,0x00,0x03,0x02,0x00,0x03,0x02,0x00,0x06,0x02,0x00,0x06,0xE2,0x00,0x07,0xE3,0xE0,0x0C,0x62,0x70,0x08,0xC2,0x38,0x1C,0xC2,0x18,0x37,0x86,0x00,0x23,0x86,0x00,0x01,0x86,0x00,0x03,0xC6,0x00,0x06,0x32,0x00,0x0C,0x18,0x00,0x18,0x0E,0x00,0x30,0x07,0xC0,0x40,0x03,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"取":[0x00,0x00,0x00,0x00,0xF8,0x00,0x1F,0xF8,0x00,0x3E,0xC0,0x00,0x0C,0xC0,0x60,0x0C,0xC3,0xF0,0x0D,0xDF,0xE0,0x0F,0xC0,0xE0,0x0C,0xD8,0xC0,0x0C,0xCC,0xC0,0x0F,0xC6,0xC0,0x0F,0xC3,0x80,0x08,0xC1,0x80,0x08,0xF1,0x80,0x09,0xC3,0xC0,0x0F,0xC6,0xE0,0xFC,0xDC,0x78,0x60,0xF0,0x3F,0x00,0xC0,0x1E,0x00,0xC0,0x00,0x00,0xC0,0x00,0x00,0xC0,0x00,0x00,0x80,0x00,0x00,0x00,0x00],"东":[0x00,0x10,0x00,0x00,0x18,0x00,0x00,0x1C,0x00,0x00,0x18,0x00,0x00,0x30,0x00,0x00,0x33,0xF0,0x00,0x7F,0xF0,0x0F,0xF8,0x00,0x06,0x40,0x00,0x00,0xD8,0x00,0x00,0x9C,0x00,0x01,0x88,0x00,0x03,0x0F,0xC0,0x07,0xFF,0xE0,0x07,0xF8,0x00,0x06,0x08,0x00,0x00,0x0C,0x80,0x01,0x0C,0xE0,0x03,0x0C,0x70,0x06,0x0C,0x38,0x0E,0x0C,0x18,0x0C,0x5C,0x18,0x08,0x7C,0x00,0x00,0x38,0x00],"西":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xC0,0x00,0xFF,0xC0,0x07,0xFC,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0xCC,0x00,0x00,0xCC,0xF8,0x00,0xFF,0xFC,0x3F,0xC8,0x1C,0x18,0xC8,0x18,0x18,0x88,0x18,0x18,0x8F,0x98,0x09,0x83,0x18,0x09,0x00,0x38,0x0C,0x00,0x30,0x0C,0x3F,0x30,0x0F,0xFF,0xB0,0x0C,0x00,0xF0,0x04,0x00,0xE0,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00],"无":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x00,0x3F,0x00,0x03,0xF8,0x00,0x00,0x70,0x00,0x00,0x70,0x00,0x00,0x61,0x80,0x00,0x6F,0xC0,0x00,0xFF,0x00,0x0F,0xF0,0x00,0x06,0x58,0x00,0x00,0xD8,0x00,0x00,0xD8,0x00,0x01,0x98,0x00,0x01,0x98,0x04,0x03,0x18,0x04,0x07,0x18,0x04,0x0E,0x18,0x0E,0x1C,0x0F,0xFE,0x30,0x07,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"信":[0x00,0x00,0x00,0x03,0x07,0x80,0x03,0x83,0x80,0x03,0x81,0x80,0x03,0x00,0x08,0x07,0x01,0xFE,0x06,0xFF,0xFE,0x0C,0x60,0x00,0x0E,0x00,0xC0,0x1E,0x0F,0xE0,0x32,0x0C,0x00,0x62,0x00,0x00,0x42,0x07,0xC0,0x82,0x0E,0x00,0x02,0x00,0x00,0x02,0x01,0xF0,0x02,0x1F,0xF8,0x06,0x18,0x70,0x06,0x18,0x60,0x06,0x18,0xE0,0x06,0x0F,0xE0,0x06,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"息":[0x00,0x30,0x00,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x20,0x00,0x00,0x4F,0x80,0x03,0xFB,0xC0,0x01,0x81,0x80,0x01,0x99,0x80,0x01,0xF9,0x80,0x01,0x81,0x80,0x01,0x9F,0x00,0x01,0xFB,0x00,0x01,0x83,0x00,0x01,0x8F,0x00,0x01,0xFF,0x00,0x00,0x83,0x7C,0x08,0x18,0x1C,0x0B,0x1C,0x0E,0x19,0x0C,0x00,0x39,0x80,0x40,0x38,0x80,0x60,0x10,0xE0,0x38,0x00,0x7F,0xF8,0x00,0x1F,0xF0],"衣":[0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x38,0x00,0x00,0x1C,0x00,0x00,0x00,0xC0,0x00,0x0F,0xE0,0x00,0xFF,0x80,0x0F,0xE0,0x00,0x00,0x30,0xC0,0x00,0x60,0xC0,0x00,0x71,0xC0,0x00,0xC9,0x00,0x01,0xC6,0x00,0x03,0x46,0x00,0x06,0x43,0x00,0x0C,0x41,0x80,0x18,0x40,0xE0,0x20,0x48,0xFC,0x00,0x78,0x7F,0x00,0xF0,0x00,0x00,0xE0,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"服":[0x00,0x00,0x00,0x00,0x00,0xC0,0x01,0x97,0xE0,0x1F,0xDE,0xC0,0x19,0x98,0xC0,0x19,0x98,0xC0,0x19,0x9B,0x80,0x09,0x9B,0x80,0x0F,0x99,0x00,0x09,0x98,0xC0,0x09,0x9F,0xE0,0x19,0x9C,0xE0,0x1F,0x9C,0xC0,0x1D,0x96,0xC0,0x19,0x93,0xC0,0x19,0x91,0x80,0x11,0x91,0x80,0x31,0x93,0xC0,0x27,0x9E,0x70,0x63,0xB8,0x3E,0x43,0x30,0x1F,0x80,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"药":[0x00,0x03,0x00,0x01,0x83,0x80,0x00,0xC3,0x00,0x00,0xC7,0xF8,0x07,0xFF,0xF8,0x1F,0xC6,0x00,0x00,0x44,0x00,0x03,0x4F,0x00,0x03,0x03,0x80,0x03,0x43,0x00,0x06,0x66,0x70,0x0C,0xEF,0xF8,0x1F,0xC8,0x38,0x09,0x90,0x30,0x03,0x0C,0x30,0x07,0xE6,0x30,0x0F,0x83,0x30,0x0C,0x02,0x30,0x00,0x60,0x30,0x07,0x80,0x30,0x3E,0x01,0x70,0x1C,0x01,0xE0,0x00,0x00,0xE0,0x00,0x00,0x00],"品":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0x03,0xFF,0xC0,0x01,0xE3,0xC0,0x01,0x83,0x80,0x00,0x83,0x00,0x00,0xC3,0x00,0x00,0xFF,0x00,0x00,0xF8,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x23,0xEF,0xFE,0x3E,0xE6,0x1C,0x30,0xE6,0x18,0x18,0xC6,0x38,0x18,0xC6,0x38,0x1F,0xC7,0xF8,0x1F,0x07,0xC0,0x18,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"课":[0x00,0x00,0x00,0x00,0x00,0x60,0x18,0x07,0xF0,0x0E,0x7E,0x38,0x06,0x66,0x30,0x02,0x67,0xF0,0x00,0x3E,0x60,0x00,0x26,0x60,0x0C,0x3F,0xC0,0x1E,0x3E,0x40,0xFC,0x06,0x70,0x6C,0x07,0xF8,0x0C,0xFE,0x00,0x0C,0xDF,0x00,0x0C,0x1F,0x80,0x09,0x36,0xC0,0x0E,0x26,0xF0,0x1E,0x66,0x7E,0x1C,0xC6,0x3F,0x19,0x86,0x00,0x12,0x06,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x00,0x00,0x00],"本":[0x00,0x70,0x00,0x00,0x38,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x33,0xC0,0x00,0x3F,0xC0,0x07,0xF8,0x00,0x03,0x30,0x00,0x00,0x78,0x00,0x00,0x78,0x00,0x00,0xF4,0x00,0x00,0xB6,0x00,0x01,0xB3,0x80,0x03,0x31,0xC0,0x06,0x30,0xF0,0x0C,0x3E,0x7C,0x19,0xFE,0x3F,0x31,0xF0,0x00,0x60,0x30,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x30,0x00,0x00,0x00,0x00],"给":[0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x07,0x07,0x00,0x06,0x06,0x00,0x0C,0x86,0x00,0x0C,0xCE,0x00,0x19,0x8D,0x00,0x31,0x88,0x80,0x3F,0x18,0xE0,0x26,0x10,0x70,0x0C,0x30,0x3C,0x1F,0xE7,0x9F,0x3E,0x5F,0x00,0x38,0x80,0x00,0x00,0x01,0xC0,0x03,0xBF,0xE0,0x1E,0x30,0xE0,0x78,0x30,0xC0,0x60,0x30,0xC0,0x00,0x1F,0xC0,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"家":[0x00,0x70,0x00,0x00,0x38,0x00,0x00,0x18,0x60,0x04,0x1F,0xF8,0x0F,0xF0,0x78,0x0C,0x00,0x60,0x18,0x06,0x00,0x18,0xFE,0x00,0x10,0xF0,0x00,0x00,0x61,0x80,0x00,0xC3,0x80,0x03,0xC3,0x00,0x0E,0x64,0x00,0x00,0xF8,0x00,0x01,0xB6,0x00,0x02,0x73,0x00,0x04,0xF9,0xE0,0x01,0xD8,0xFE,0x03,0x18,0x78,0x0E,0x18,0x00,0x10,0x18,0x00,0x00,0xF8,0x00,0x00,0x70,0x00,0x00,0x00,0x00],"长":[0x00,0x00,0x00,0x03,0x82,0x00,0x01,0xC3,0x80,0x01,0xC3,0x80,0x00,0xC7,0x00,0x00,0xCC,0x00,0x00,0x88,0x00,0x00,0x90,0x00,0x00,0xE0,0x20,0x00,0xC7,0xF8,0x01,0xFF,0xF0,0x7F,0xE0,0x00,0x38,0xB0,0x00,0x00,0x98,0x00,0x00,0x8C,0x00,0x00,0x86,0x00,0x00,0x83,0x80,0x00,0x81,0xE0,0x01,0x98,0xFC,0x01,0xF0,0x7F,0x01,0xE0,0x00,0x03,0xC0,0x00,0x03,0x80,0x00,0x00,0x00,0x00],"回":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF8,0x33,0xFF,0xFC,0x3F,0x80,0x3C,0x18,0x00,0x38,0x18,0x0E,0x38,0x19,0xFF,0x30,0x18,0x86,0x30,0x18,0x86,0x30,0x08,0xCC,0x30,0x0C,0xFC,0x30,0x0C,0x40,0x30,0x0C,0x00,0x30,0x0C,0x1F,0x70,0x0F,0xFF,0xE0,0x0C,0x00,0xE0,0x0C,0x00,0x60,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"电":[0x00,0xC0,0x00,0x00,0x70,0x00,0x00,0x70,0x00,0x00,0x60,0x00,0x00,0x60,0x00,0x00,0x61,0x80,0x00,0x7F,0xC0,0x1F,0xE1,0xE0,0x0C,0x61,0xC0,0x0C,0x61,0x80,0x0C,0x7D,0x80,0x0D,0xE1,0x80,0x04,0x63,0x00,0x04,0x63,0x00,0x06,0xFF,0x00,0x07,0xE2,0x08,0x00,0x60,0x08,0x00,0x60,0x18,0x00,0x60,0x18,0x00,0x30,0x3C,0x00,0x3F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"话":[0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x00,0xC0,0x07,0x80,0xE0,0x01,0x83,0xE0,0x00,0x87,0x80,0x00,0x1E,0x00,0x00,0x13,0x00,0x00,0x03,0x00,0x07,0x03,0x7E,0x3F,0x1F,0xFE,0xF6,0xFE,0x00,0x06,0x06,0x00,0x06,0x06,0x00,0x04,0x07,0xE0,0x04,0x3F,0xF0,0x04,0xB0,0x70,0x0F,0x30,0x60,0x0F,0x10,0x60,0x0E,0x1F,0xE0,0x0C,0x1F,0xE0,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00]} name={'01':'张磊','02':'郭鑫凡','03':'李文轩','04':'侯心爽','05':'李寒笑'} action={'01':'到门卫处取东西','02':'到门卫处取药品','03':'到门卫处取衣服','04':'到门卫处取课本','05':'给家长回电话'} font_rect2={"1":[0x00,0x00,0x00,0x00,0x00,0x00,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,0xFF,0xFE,0x7F,0xFF,0xFE,0x7F,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"2":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xF8,0x1F,0xFF,0xF8,0x1F,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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,0xFF,0xFE,0x7F,0xFF,0xFE,0x7F,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"3":[0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xF8,0x1F,0xFF,0xF8,0x1F,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xE0,0x07,0xFF,0xE0,0x07,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFE,0x7F,0xFF,0xFE,0x7F,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"条":[0x00,0x80,0x00,0x00,0xE0,0x00,0x01,0xC0,0x00,0x01,0xFF,0xF0,0x03,0xFF,0xE0,0x07,0xC0,0xE0,0x0E,0xE1,0xC0,0x0E,0x73,0x80,0x1C,0x3F,0x00,0x08,0x3E,0x00,0x00,0xFF,0xE0,0x0F,0xF3,0xFE,0x7F,0x9C,0xFE,0x7C,0x1C,0x0E,0x00,0x1C,0x00,0x1F,0xFF,0xF8,0x1F,0xFF,0xF8,0x00,0x1C,0x00,0x01,0x1C,0x80,0x03,0x9D,0xE0,0x0F,0x1C,0xF0,0x3E,0x1C,0x7C,0x78,0x7C,0x1C,0x30,0x7C,0x08]} font_rect3={"张":[0x00,0x10,0x00,0x00,0x1C,0x00,0x01,0x98,0x60,0x0F,0xD8,0xE0,0x1D,0x98,0xC0,0x01,0x19,0x80,0x03,0x19,0x00,0x03,0x1A,0x00,0x1F,0x1C,0x00,0x18,0x18,0xF0,0x18,0x1F,0xF0,0x18,0xFE,0x00,0x1F,0x1A,0x00,0x3B,0x19,0x00,0x33,0x19,0x80,0x03,0x18,0xC0,0x03,0x18,0xE0,0x03,0x18,0x7C,0x06,0x1B,0x3F,0x1E,0x1E,0x08,0x1E,0x3C,0x00,0x0C,0x38,0x00,0x00,0x10,0x00,0x00,0x00,0x00],"磊":[0x00,0x00,0x00,0x00,0x0F,0xE0,0x00,0xFF,0x80,0x00,0x18,0x00,0x00,0x38,0x00,0x00,0x33,0xE0,0x00,0x7E,0xE0,0x00,0xE0,0xC0,0x01,0xE1,0xC0,0x07,0x7F,0xC0,0x0C,0x30,0x00,0x00,0x00,0x1E,0x00,0x7F,0xFE,0x0F,0xF3,0xC0,0x01,0x80,0xC0,0x01,0x81,0x80,0x03,0x73,0xFC,0x07,0xF3,0xDC,0x06,0x37,0x1C,0x0E,0x6F,0x18,0x1F,0xFB,0xFC,0x62,0x23,0x80,0x02,0x01,0x00,0x00,0x00,0x00],"鑫":[0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x6C,0x00,0x00,0xC7,0x00,0x01,0xBF,0xC0,0x03,0xF0,0xF8,0x06,0x3E,0x40,0x09,0xF0,0x00,0x00,0xB6,0x00,0x00,0xF9,0x80,0x00,0x7F,0x80,0x07,0x83,0x00,0x01,0x87,0x80,0x03,0x6C,0xE0,0x06,0x1F,0xF8,0x0F,0xF6,0x1F,0x1B,0x03,0xC0,0x63,0xCF,0x80,0x07,0x42,0xC0,0x0F,0xCA,0x80,0x07,0xE2,0x60,0x1F,0xBF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00],"凡":[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x1F,0x00,0x03,0xFF,0x00,0x01,0x86,0x00,0x01,0x86,0x00,0x01,0x84,0x00,0x01,0x8C,0x00,0x01,0x8C,0x00,0x01,0xEC,0x00,0x01,0xFC,0x00,0x01,0xBC,0x00,0x01,0x8C,0x00,0x01,0x0C,0x00,0x03,0x0C,0x02,0x03,0x0C,0x02,0x06,0x0C,0x06,0x06,0x06,0x06,0x0C,0x07,0xFE,0x18,0x03,0xFE,0x30,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00],"侯":[0x00,0x00,0x00,0x03,0x00,0xC0,0x03,0x8F,0xE0,0x03,0x1D,0xC0,0x03,0x01,0x80,0x06,0x01,0xFC,0x06,0x1F,0xFC,0x0C,0xFC,0x00,0x0C,0x0C,0x00,0x1C,0x19,0xC0,0x36,0x1F,0xC0,0x26,0x36,0x00,0x46,0x66,0x00,0x86,0x06,0xFC,0x06,0x3F,0xFC,0x07,0xF6,0x00,0x06,0x07,0x00,0x06,0x0D,0x80,0x06,0x0C,0xC0,0x0C,0x18,0xF0,0x0C,0x30,0x7C,0x04,0xE0,0x3F,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,0x38,0x38,0x00,0x38,0x3C,0x00,0x18,0x1C,0x00,0x00,0x04,0x19,0x00,0x00,0x19,0x00,0x00,0x19,0x80,0x80,0x39,0x80,0xC0,0x30,0xC0,0x60,0x30,0xC0,0x78,0x00,0x70,0xF8,0x00,0x3F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"爽":[0x00,0x30,0x00,0x00,0x38,0x00,0x00,0x38,0x00,0x00,0x13,0x00,0x00,0x3F,0x80,0x03,0xFC,0x00,0x00,0x14,0xC0,0x01,0x97,0xC0,0x07,0xB3,0x00,0x03,0x37,0x80,0x07,0xBC,0xC0,0x0C,0xB4,0xC0,0x01,0xB3,0x80,0x07,0x37,0x80,0x03,0x3D,0xC0,0x05,0xF8,0xC0,0x08,0x6C,0x00,0x00,0x66,0x00,0x00,0xC3,0x00,0x01,0x83,0x80,0x07,0x01,0xE0,0x1C,0x00,0xFC,0x00,0x00,0x00,0x00,0x00,0x00],"寒":[0x00,0x30,0x00,0x00,0x38,0x00,0x00,0x18,0x00,0x00,0x03,0xF0,0x05,0xFF,0xF8,0x0F,0x8C,0x78,0x1C,0xC4,0x40,0x18,0xCF,0x00,0x13,0xFC,0x00,0x00,0xC4,0x00,0x00,0x5F,0x00,0x01,0xFC,0x00,0x00,0x44,0x40,0x00,0x7F,0xE0,0x0F,0xFC,0x00,0x04,0xC6,0x00,0x01,0x83,0x80,0x03,0x39,0xC0,0x06,0x18,0xF8,0x0C,0x08,0x7F,0x38,0x00,0x10,0x40,0x70,0x00,0x00,0x38,0x00,0x00,0x1C,0x00],"笑":[0x00,0x00,0x00,0x01,0x03,0x80,0x01,0x83,0x10,0x03,0x33,0xF8,0x03,0xF6,0x00,0x06,0x07,0x00,0x0D,0xC9,0xC0,0x18,0xD0,0xC0,0x10,0x0C,0x00,0x00,0x3E,0x00,0x01,0xF8,0x00,0x00,0x60,0x00,0x00,0x61,0xC0,0x00,0x7F,0xC0,0x1F,0xF0,0x00,0x0C,0x60,0x00,0x00,0xD0,0x00,0x00,0xC8,0x00,0x01,0x8E,0x00,0x03,0x07,0x80,0x06,0x03,0xE0,0x1C,0x01,0xFC,0x00,0x00,0x00,0x00,0x00,0x00],"李":[0x00,0x60,0x00,0x00,0x70,0x00,0x00,0x30,0x00,0x00,0x37,0x80,0x00,0xFF,0x80,0x0F,0xF0,0x00,0x00,0x78,0x00,0x00,0xEC,0x00,0x01,0xA7,0x00,0x03,0x23,0xE0,0x06,0x21,0xFD,0x0C,0x3E,0x60,0x1B,0xEE,0x01,0x00,0x08,0x00,0x00,0x70,0x70,0x00,0x3F,0xF8,0x0F,0xFC,0x38,0x7F,0x10,0x00,0x30,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,0xB8,0x00,0x00,0xF0,0x00],"文":[0x00,0x00,0x00,0x00,0x70,0x00,0x00,0x38,0x00,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x00,0x1F,0xE0,0x03,0xFC,0x00,0x0F,0x98,0x00,0x00,0x1C,0x00,0x07,0x18,0x00,0x01,0x98,0x00,0x00,0xD8,0x00,0x00,0x70,0x00,0x00,0x30,0x00,0x00,0x78,0x00,0x00,0xFC,0x00,0x03,0xCE,0x00,0x0F,0x07,0x80,0x7C,0x03,0xF0,0x00,0x01,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"轩":[0x02,0x00,0x00,0x03,0x00,0x00,0x03,0x00,0x00,0x03,0x00,0x00,0x02,0x00,0x30,0x07,0xE1,0xF8,0x1F,0xCF,0xE0,0x1C,0x01,0x80,0x0F,0x01,0x80,0x0B,0x01,0x80,0x09,0x01,0xBE,0x1B,0xE3,0xFE,0x3F,0x1F,0x80,0x31,0x01,0x80,0x01,0xE1,0x80,0x07,0xC1,0x80,0x7F,0x01,0x80,0x73,0x01,0x80,0x03,0x01,0x80,0x03,0x01,0x80,0x03,0x01,0x80,0x03,0x01,0x80,0x03,0x01,0x80,0x00,0x01,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],"郭":[0x00,0xE0,0x00,0x00,0x60,0x00,0x00,0x28,0x00,0x01,0xFC,0x18,0x1F,0x82,0x7C,0x08,0x33,0xF8,0x07,0xFB,0x30,0x06,0x33,0x20,0x02,0xE3,0x60,0x03,0x03,0x40,0x00,0x73,0x30,0x0F,0xBB,0x18,0x06,0x63,0x1C,0x00,0xC3,0x0C,0x00,0xFB,0x0C,0x07,0xC3,0x7C,0x3F,0xC3,0x1C,0x38,0xC3,0x08,0x00,0xC3,0x00,0x03,0xC3,0x00,0x01,0xC3,0x00,0x00,0x83,0x00,0x00,0x03,0x00,0x00,0x03,0x00]} KEYS = [0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01] #初始化24*24的点阵位置,每个汉字需要24*24=256个点来表示 def font_show(font_con): for m in range(len(font_con)): if font_rect1.get(font_con[m],"Never")!="Never": font=font_rect1.get(font_con[m]) else: if font_rect2.get(font_con[m],"Never")!="Never": font=font_rect2.get(font_con[m]) else: font=font_rect3.get(font_con[m],"无") #根据读取到数据给我们的24*24点阵赋值 rect_list = [] * 24 for i in range(24): rect_list.append([] * 24) for k in range(len(font) // 3): row_list = rect_list[k] for j in range(3): for i in range(8): asc = font[k * 3 + j] flag = asc & KEYS row_list.append(flag) #根据获取到的24*24点阵信息,打印到控制台 j=0 for row in rect_list: k=0 for i in row: if i: #前景字符(即用来表示汉字笔画的输出字符) lcd.pixel((m%13)*24+k, (m//13)*24+j, 0xffffff) k=k+1 j=j+1 font_first="" list=[] def buttonA_wasPressed(): # global params global font_first lcd.fill(0x000000) if len(font_first)>130: font_first=font_first[131:] font_show(font_first) else: font_show("无信息") pass btnA.wasPressed(buttonA_wasPressed) def fun_j88LywSZR_(topic_data): # global params global list list.append(str(topic_data)) pass m5mqtt.subscribe(str('12IZ3JpWR'), fun_j88LywSZR_) def buttonB_wasPressed(): # global params global list,font_first if not (wifiCfg.wlan_sta.isconnected()): pass else: lcd.fill(0x000000) m5mqtt.publish(str('E1RcL1tZg'),str('已阅')) list=[] font_first="" pass btnB.wasPressed(buttonB_wasPressed) def buttonC_wasPressed(): # global params global font_first,list j=1 for i in list: font_first=font_first+str(j)+"条"+name.get(i[0:2])+action.get(i[2:4]) for k in range(13-len(font_first)%13): font_first=font_first+"空" j=j+1 font_show(font_first) pass btnC.wasPressed(buttonC_wasPressed) setScreenColor(0xffff66) wifiCfg.doConnect('mxy', 'smj080823') while not (wifiCfg.wlan_sta.isconnected()): pass setScreenColor(0x663300) m5mqtt.start() lcd.fill(0x000000)[/mw_shl_code] 14、M5Stack端演示视频 先使用Easy lot网页版进行信息操作,M5Stack端进行显示。 手机端APP设计 手机端APP设计,使用平台: App Inventor 2 WxBit 汉化增强版,登陆网址:https://app.wxbit.com/login/。 1、界面设计 其中mqtt客户端服务器URI为tcp://iot.dfrobot.com.cn:1883 其它设计如下图 2、逻辑设计 (1)初始化设置 对姓名、事件建立列表。姓名只取部分演示。并进行MQTT连接。 (2)当MQTT连接成功时,进行订阅。 (3)当提交按钮被点击时,发送信息 (4)当收到反馈信息时,显示“时间”加“信息已阅” 成品视频演示 源代码 |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed