Browse Source

添加文字显示

liuhao 3 years ago
parent
commit
de4d65c33c

+ 23 - 17
TEST_Prj/stm32_SmartLed_proprj/Demo/HARDWARE/oled/oledfont.h

@@ -209,23 +209,29 @@ const unsigned char F8X16[]=
   0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94
 };
 chinese Hzk[]={
-"流",
-{0x10,0x60,0x02,0x8C,0x00,0x44,0x64,0x54,0x4D,0x46,0x44,0x54,0x64,0xC4,0x04,0x00,0x04,0x04,0x7E,0x01,0x80,0x40,0x3E,0x00,0x00,0xFE,0x00,0x00,0x7E,0x80,0xE0,0x00},
-"速",
-{0x40,0x40,0x42,0xCC,0x00,0x04,0xF4,0x94,0x94,0xFF,0x94,0x94,0xF4,0x04,0x00,0x00,0x00,0x40,0x20,0x1F,0x20,0x48,0x44,0x42,0x41,0x5F,0x41,0x42,0x44,0x48,0x40,0x00},
-"温",
-{0x10,0x60,0x02,0x8C,0x00,0x00,0xFE,0x92,0x92,0x92,0x92,0x92,0xFE,0x00,0x00,0x00,0x04,0x04,0x7E,0x01,0x40,0x7E,0x42,0x42,0x7E,0x42,0x7E,0x42,0x42,0x7E,0x40,0x00},
-"度",
-{0x00,0x00,0xFC,0x24,0x24,0x24,0xFC,0x25,0x26,0x24,0xFC,0x24,0x24,0x24,0x04,0x00,0x40,0x30,0x8F,0x80,0x84,0x4C,0x55,0x25,0x25,0x25,0x55,0x4C,0x80,0x80,0x80,0x00},
-"剩",
-{0x48,0x4A,0xFA,0x0A,0xFE,0x09,0xF9,0x49,0xA8,0x00,0x00,0xF0,0x00,0x00,0xFF,0x00,0x22,0x11,0x0B,0x04,0xFF,0x04,0x09,0x12,0x23,0x00,0x00,0x0F,0x40,0x80,0x7F,0x00},
-"余",
-{0x80,0x80,0x40,0x20,0x50,0x48,0x44,0xC3,0x44,0x48,0x50,0x20,0x40,0x80,0x80,0x00,0x00,0x40,0x22,0x1A,0x02,0x42,0x82,0x7F,0x02,0x02,0x02,0x0A,0x12,0x60,0x00,0x00},
-"量",
-{0x20,0x20,0x20,0xBE,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xBE,0x20,0x20,0x20,0x00,0x00,0x80,0x80,0xAF,0xAA,0xAA,0xAA,0xFF,0xAA,0xAA,0xAA,0xAF,0x80,0x80,0x00,0x00},
-"℃",
-{0x06,0x09,0x09,0xE6,0xF8,0x0C,0x04,0x02,0x02,0x02,0x02,0x02,0x04,0x1E,0x00,0x00,0x00,0x00,0x00,0x07,0x1F,0x30,0x20,0x40,0x40,0x40,0x40,0x40,0x20,0x10,0x00,0x00},/*"℃",7*/
-/* (16 X 16 , 宋体 )*/
+"时",
+{0x00,0xFC,0x84,0x84,0x84,0xFC,0x00,0x10,0x10,0x10,0x10,0x10,0xFF,0x10,0x10,0x00,0x00,0x3F,0x10,0x10,0x10,0x3F,0x00,0x00,0x01,0x06,0x40,0x80,0x7F,0x00,0x00,0x00},
+"间",
+{0x00,0xF8,0x01,0x06,0x00,0xF0,0x12,0x12,0x12,0xF2,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x1F,0x11,0x11,0x11,0x1F,0x00,0x40,0x80,0x7F,0x00,0x00},
+"闹",
+{0x00,0xF8,0x01,0x22,0x20,0x22,0x2A,0xF2,0x22,0x22,0x22,0x22,0x02,0xFE,0x00,0x00,0x00,0xFF,0x00,0x00,0x1F,0x01,0x01,0x7F,0x09,0x11,0x0F,0x40,0x80,0x7F,0x00,0x00},
+"钟",
+{0x20,0x10,0x2C,0xE7,0x24,0x24,0x00,0xF0,0x10,0x10,0xFF,0x10,0x10,0xF0,0x00,0x00,0x01,0x01,0x01,0x7F,0x21,0x11,0x00,0x07,0x02,0x02,0xFF,0x02,0x02,0x07,0x00,0x00},
+"学",
+{0x40,0x30,0x11,0x96,0x90,0x90,0x91,0x96,0x90,0x90,0x98,0x14,0x13,0x50,0x30,0x00,0x04,0x04,0x04,0x04,0x04,0x44,0x84,0x7E,0x06,0x05,0x04,0x04,0x04,0x04,0x04,0x00},
+"习",
+{0x00,0x02,0x02,0x02,0x12,0x22,0xC2,0x02,0x02,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x08,0x18,0x08,0x04,0x04,0x04,0x02,0x02,0x41,0x81,0x40,0x3F,0x00,0x00,0x00},
+"坐",
+{0x00,0x80,0x60,0x1E,0x20,0xC0,0x00,0xFF,0x00,0x80,0x60,0x1E,0x20,0xC0,0x00,0x00,0x41,0x40,0x44,0x44,0x44,0x44,0x44,0x7F,0x44,0x44,0x44,0x44,0x44,0x40,0x40,0x00},
+"姿",
+{0x20,0x21,0xF2,0x08,0x04,0x10,0x88,0x84,0x47,0x34,0x44,0x84,0x94,0x0C,0x00,0x00,0x04,0x84,0x85,0x94,0x5D,0x57,0x24,0x24,0x24,0x54,0x4C,0x44,0x84,0x05,0x05,0x00},
+"正",
+{0x00,0x02,0x02,0xC2,0x02,0x02,0x02,0xFE,0x82,0x82,0x82,0x82,0x82,0x02,0x00,0x00,0x40,0x40,0x40,0x7F,0x40,0x40,0x40,0x7F,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00},
+"常",
+{0x20,0x18,0x08,0xEA,0xAC,0xA8,0xA8,0xAF,0xA8,0xA8,0xAC,0xEA,0x08,0x28,0x18,0x00,0x00,0x00,0x3E,0x02,0x02,0x02,0x02,0xFF,0x02,0x02,0x12,0x22,0x1E,0x00,0x00,0x00},
+"异",
+{0x00,0x00,0x7E,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x9E,0x80,0xE0,0x00,0x00,0x08,0x88,0x48,0x28,0x1E,0x08,0x08,0x08,0x08,0x08,0xFE,0x08,0x08,0x08,0x08,0x00},
+
 
 //{0x00,0x10,0x00,0x10,0x3E,0x10,0x22,0x10,0xA2,0x7F,0x22,0x10,0x22,0x10,0x3E,0x10,0x22,0x11,0x22,0x12,0x22,0x12,0x22,0x10,0x3E,0x10,0x22,0x10,0x00,0x14,0x00,0x08},"时",/*0*/
 ///* (16 X 16 , 宋体 )*/

File diff suppressed because it is too large
+ 0 - 0
TEST_Prj/stm32_SmartLed_proprj/Demo/USER/Demo.uvguix.liuhao


+ 14 - 7
TEST_Prj/stm32_SmartLed_proprj/Demo/USER/main.c

@@ -313,7 +313,14 @@ int main(void)
 						}		
 						GzVal = Dispose();		
 						cj_val=Wave_Start();
-					printf("wsdgzcheck_X%dH%dD%dZ\r\n",temp,humi,GzVal);//发送到上位机app
+						if(cj_val<10)
+						{
+						  OLED_ShowText(0,6,"坐姿:异常",0);
+						}else
+						{
+						   OLED_ShowText(0,6,"坐姿:正常",0);
+						}
+					  printf("wsdgzcheck_X%dH%dD%dZ\r\n",temp,humi,GzVal);//发送到上位机app
 									
 					
 			}
@@ -322,16 +329,16 @@ int main(void)
 				 {
 								DataUpTime=0;// 
 								Ds1302_Readtime();
-								sprintf((char*)DateShowBuf,"Time:%2d:%2d:%2d", (int)ds1302Data.hour, (int)ds1302Data.min, (int)ds1302Data.sec);
+								sprintf((char*)DateShowBuf,"时间:%2d:%2d:%2d", (int)ds1302Data.hour, (int)ds1302Data.min, (int)ds1302Data.sec);
 								ShowTo(DateShowBuf,9);
-								OLED_ShowString(36,0,(u8*)DateShowBuf,16);
-								sprintf((char*)DateShowBuf,"alarm:%2d:%2d:00", (int)set_s1, (int)set_f1);
+								OLED_ShowText(0,0,DateShowBuf,0);
+								sprintf((char*)DateShowBuf,"闹钟:%2d:%2d:00", (int)set_s1, (int)set_f1);
 								ShowTo(DateShowBuf,10);
-								OLED_ShowString(36,2,(u8*)DateShowBuf,16);
+								OLED_ShowText(0,2,DateShowBuf,0);
 					 
-								sprintf((char*)DateShowBuf,"study:%2d:%2d:%2d", (int)cnt_s1, (int)cnt_f1,cnt_m1);
+								sprintf((char*)DateShowBuf,"学习:%2d:%2d:%2d", (int)cnt_s1, (int)cnt_f1,cnt_m1);
 								ShowTo(DateShowBuf,10);
-								OLED_ShowString(36,4,(u8*)DateShowBuf,16);
+								OLED_ShowText(0,4,DateShowBuf,0);
 								
 						 
 

Some files were not shown because too many files changed in this diff