zigbee板子:lcd显示汉字

main函数

#include <ioCC2530.h>
#include "LCD.h"void main()
{//unsigned char i=0; LCD_Init();                      //oled 初始化  LCD_CLS();                      //屏全亮 LCD_welcome();while(1){}
}   

首先呢。我们运行这个程序,然后可以看到在LCD屏上显示如下图像。第一行显示,你好这是这四个字,第二行显示协调器这三个字。第三行显示的是一个字符串,第四行显示的也是一行字符串。那么这是如何实现的呢?首先我们打开main函数,可以看到在main函数里面有三个函数,这个代码的最主要的一部分就是LCD_welcome,这个函数里面的内容就是我们显示出来的内容,我们对这个函数进行修改,就能在LCD上显示出我们想要的内容。

在这里插入图片描述

lcd.h文件

LCD_P16x16Ch函数

/*****************功能描述:显示16*16点阵  显示的坐标(x,y)****************************/
void LCD_P16x16Ch(unsigned char x, unsigned char y, unsigned char N)
{unsigned char wm=0;unsigned int adder=32*N;  //      LCD_Set_Pos(x , y);for(wm = 0;wm < 16;wm++)  //             {LCD_WrDat(F16x16[adder]);    adder += 1;}      LCD_Set_Pos(x,y + 1); for(wm = 0;wm < 16;wm++) //         {LCD_WrDat(F16x16[adder]);adder += 1;}           
}

LCD_P8x16Str函数

/*******************功能描述:显示8*16一组标准ASCII字符串     显示的坐标(x,y)****************/
void LCD_P8x16Str(unsigned char x, unsigned char y,unsigned char ch[])
{unsigned char c=0,i=0,j=0;while (ch[j]!='\0'){    c =ch[j]-32;if(x>120){x=0;y++;}LCD_Set_Pos(x,y);    for(i=0;i<8;i++)     LCD_WrDat(F8X16[c*16+i]);LCD_Set_Pos(x,y+1);    for(i=0;i<8;i++)     LCD_WrDat(F8X16[c*16+i+8]);  x+=8;j++;}
}

LCD_welcome函数

转到welcome这个函数的定义,我们可以发现它处于LCD.H文件里。现在我们找到LCD.H文件。代码粘贴到下方了,现在跳转到下方的代码处进行进一步说明。
现在我们看到LCD_welcome函数。由于LCD屏上显示的是四行,可以看到,在我们LCD_welcome函数里面也是主要有四个输出。其中两个是在for循环里面被函数调用。另外两个是直接通过函数调用。

这两个被调用的函数都不一样,他们的定义的代码就写在上方。第一个P16X16CH函数。的功能是显示汉字,第二个P8x16STR函数的功能是显示字符串。我们在分别看这两个函数里面的共同点和不同点,他们的共同之处都是调用了一个LCDSetPOS函数和调用了LCD-wrdat函数,但是呢,他们的不同点在于传到LCD-WRDat函数的参数是不同的数组。

void LCD_welcome()
{int i=0;for(i=0; i<4; i++){LCD_P16x16Ch(16*i+32, 0, i);}for(i=0; i<3; i++){LCD_P16x16Ch(40+16*i, 2, 4+i);}LCD_P8x16Str(16, 4, "QQ:1366449519");LCD_P8x16Str(32, 6, "2020-5-18");
}

去观察代码可以发现。LCD杠P16X16CH函数和LCD杠P8x16STR函数。里面的前两个数是坐标的意思,第一个数是横坐标,第二个数是纵坐标,而且。它们的纵坐标。每一行都间隔二。他们的横坐标可以更改字体的位置。对于我们前两个设置汉字的位置的坐标来说,它这个横坐标就是汉字的第一个坐标。从这第一个坐标之后开始写入数字,那么我们就要考虑第一个坐标的位置在哪儿,然后再放下一几个坐标的话,他们整体上是呈现出一种什么样的整体样式。我们这里三个字的话,第一个坐标就是40加16乘以i。也就是说,他第一个坐标是位于40。这么画就说明他前面是空出来了40的间距,这样的话三个字整体上看起来就好像是居中了一样,可见字体的位置呢,就是通过x和Y来进行调整。

我们还可以看到,在P16X16CH函数里面的第三个变量是i,这i就相当于我们目前写的第几个汉字。我们之所以把它分开,是因为那是第一行和第二行,为了看的更清晰,可以看到i呢,是连续的,没有说第一行,从零到三之后,第二行就再继续从零开始写。第二行是从四开始写的。

codetab.h文件

转到数组的定义可以看到他们两个不同的数组都在同一个文件中,这个文件就叫code tab文件。然后我们可以看到在F16X16数组里是一系列的字体对应的点阵。在F8x16数组里面,对应的是一系列字符的点阵。
那么现在我们再次回到LCD杠welcome函数里面,我们来看看我们是如何显示这些。特定的字符串以及特定的汉字的。

F16x16[]数组

/***************************16*16的点阵字体取模方式:共阴——列行式——逆向输出*********/
unsigned char F16x16[] = 	  	 
{ 
/*--  文字:  你  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x80,0x60,0xF8,0x07,0x40,0x20,0x18,0x0F,0x08,0xC8,0x08,0x08,0x28,0x18,0x00,
0x01,0x00,0x00,0xFF,0x00,0x10,0x0C,0x03,0x40,0x80,0x7F,0x00,0x01,0x06,0x18,0x00,/*--  文字:  好  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x10,0x10,0xF0,0x1F,0x10,0xF0,0x00,0x80,0x82,0x82,0xE2,0x92,0x8A,0x86,0x80,0x00,
0x40,0x22,0x15,0x08,0x16,0x61,0x00,0x00,0x40,0x80,0x7F,0x00,0x00,0x00,0x00,0x00,/*--  文字:  这  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x40,0x42,0xCC,0x00,0x08,0x28,0x48,0x89,0x0E,0xC8,0x38,0x08,0x08,0x00,0x00,
0x00,0x40,0x20,0x1F,0x20,0x50,0x48,0x44,0x42,0x41,0x42,0x44,0x58,0x40,0x40,0x00,/*--  文字:  是  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x7F,0x49,0x49,0x49,0x49,0x49,0x49,0x49,0x7F,0x00,0x00,0x00,0x00,
0x81,0x41,0x21,0x1D,0x21,0x41,0x81,0xFF,0x89,0x89,0x89,0x89,0x89,0x81,0x81,0x00,/*--  文字:  协  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x10,0x10,0xFF,0x10,0x10,0x00,0x90,0x10,0xFF,0x10,0x10,0xF0,0x80,0x00,0x00,0x00,
0x00,0x00,0xFF,0x00,0x04,0x82,0x41,0x30,0x0F,0x40,0x80,0x7F,0x00,0x01,0x06,0x00,/*--  文字:  调  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x42,0xCC,0x00,0x00,0xFE,0x82,0x92,0x92,0xFE,0x92,0x92,0x82,0xFE,0x00,0x00,
0x00,0x00,0x3F,0x10,0x88,0x7F,0x00,0x1E,0x12,0x12,0x12,0x5E,0x80,0x7F,0x00,0x00,/*--  文字:  器  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x80,0x80,0x9E,0x92,0x92,0x92,0x9E,0xE0,0x80,0x9E,0xB2,0xD2,0x92,0x9E,0x80,0x00,
0x08,0x08,0xF4,0x94,0x92,0x92,0xF1,0x00,0x01,0xF2,0x92,0x94,0x94,0xF8,0x08,0x00,
};

F8X16[]数组

/****************************************8*16的点阵************************************/
const unsigned char F8X16[]=	  
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// 00x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,//! 10x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//" 20x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,//# 30x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,//$ 40xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,//% 50x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,//& 60x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 70x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,//( 80x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,//) 90x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,//* 100x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,//+ 110x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,//, 120x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//- 130x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,//. 140x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,/// 150x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//0 160x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//1 170x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//2 180x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,//3 190x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,//4 200x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,//5 210x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,//6 220x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,//7 230x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//8 240x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,//9 250x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,//: 260x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,//; 270x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,//< 280x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,//= 290x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,//> 300x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,//? 310xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,//@ 320x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,//A 330x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//B 340xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//C 350x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//D 360x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//E 370x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//F 380xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//G 390x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//H 400x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//I 410x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//J 420x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//K 430x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//L 440x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,//M 450x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//N 460xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//O 470x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//P 480xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,//Q 490x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//R 500x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//S 510x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//T 520x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//U 530x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//V 540xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,//W 550x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//X 560x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//Y 570x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//Z 580x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,//[ 590x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,//\ 600x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,//] 610x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^ 620x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,//_ 630x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//` 640x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,//a 650x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//b 660x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//c 670x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,//d 680x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e 690x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//f 700x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//g 710x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//h 720x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//i 730x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//j 740x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,//k 750x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//l 760x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m 770x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//n 780x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//o 790x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,//p 800x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,//q 810x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//r 820x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//s 830x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,//t 840x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//u 850x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,//v 860x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,//w 870x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,//x 880x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,//y 890x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//z 900x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,//{ 910x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,//| 920x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,//} 930x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94
};

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/560387.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

matlab实时采集串口数据并分析串口数据传送格式

下位机 zigbee代码 最近在做基于zigbee的RSSI实时定位系统。这个系统需要我们实时的测量得到每一个位置的rssi值。首先&#xff0c;我需要研究怎么把这个rssi值通过串口传到我们的上位机上。 我们可以看到我们下位机&#xff0c;里面有一个传送数据包的一个东西&#xff0c;在…

matlab guide 打开图像并将图像显示到界面

最近又用到matlab做GUI&#xff0c;之前学的全忘了&#xff0c;还好两年前留了大实验源码。 下面我来通过源码分析一下matlab怎么做GUI。这次我来分析如何通过matlab打开图像并将图像显示到界面。 实验效果 原理 打开菜单编辑器看这个属性&#xff1a; 找到回调 可以看到回调…

matlab guide 将matlab处理过的图片保存

最近又用到matlab做GUI&#xff0c;之前学的全忘了&#xff0c;还好两年前留了大实验源码。 这次我来分析如何将matlab处理过的图片保存。 实验效果 经过灰度转换&#xff0c;图象被处理&#xff0c;并显示到另一个地方。 点击保存 图片被保存 实验原理 查看保存的回调函…

深圳linux测试题库,Linux认证考试题库及答案

Linux认证考试题库及答案1、一个文件的权限是-rw-rw-r--&#xff0c;这个文件所有者的权限是什么()a、read-onlyb、read-writec、write答案 b2、下面哪个值代表多用户启动()a、1b、0c、3d、5答案 c3、下面哪个文件代表系统初始化信息()a、/etc/inittabb、/etc/initc、/etc/proc…

matlab guide 打开excel并对其中数据进行处理

最近又用到matlab做GUI&#xff0c;之前学的全忘了&#xff0c;还好两年前留了大实验源码。 这次我来分析如何通过matlab处理excel数据 实验结果 对excel处理的效果&#xff1a; 实验原理 打开excel回调函数 function openexc_Callback(hObject, eventdata, handles) [fil…

linux 显示文件名写到txt,C++获取某个路径下所有文件的文件名,读写TXT文件到新的文件...

好久没写io操作了&#xff0c;手生了好多&#xff0c;最简单实用的C代码也push上来吧。环境&#xff1a;mac&#xff0c;xcode(注意mac环境下Windows的函数不能用)功能&#xff1a;打开一个文件目录&#xff0c;把所有文件名读取到一个TXT文件中#include #include #include #in…

生成超清分辨率视频,南洋理工开源Upscale-A-Video

大模型在生成高质量图像方面表现出色,但在生成视频任务中&#xff0c;经常会面临视频不连贯、图像模糊、掉帧等问题。 这主要是因为生成式抽样过程中的随机性,会在视频序列中引入无法预测的帧跳动。同时现有方法仅考虑了局部视频片段的时空一致性,无法保证整个长视频的整体连贯…

matlab 文件之间相互调用实例

效果&#xff1a; 找到按钮的回调 function pushbutton1_Callback(hObject, eventdata, handles) cd Deploy Nodes %square_random(100,100,0.03);%布置节点 GPS误差为0 %square_random(1000,300,0.2,30) %GPS误差为30m %C_random([1000,300,300,700],240,0.2); square_regul…

linux+虚拟机上的wdcp,linux虚拟主机服务器wdcp系统教程

满意答案eslct2017.01.29采纳率&#xff1a;47% 等级&#xff1a;9已帮助&#xff1a;1264人linux虚拟主机服务器wdcp系统教程在我们安装了网络服务管理系统wdcp后&#xff0c;可能会有不少疑问还有就是使用过程中出现的问题&#xff0c;下面为大家总结几点比较常见的&#…

matlab guide实现多级界面

matlab如何实现多级界面呢&#xff1f;也就是说&#xff0c;在一个界面点击某个地方&#xff0c;就弹出来另一个界面&#xff0c;在另一个界面还可以再进行操作。 实验结果 实验原理 首先建立两个gui&#xff0c;并且每个gui都进行如下设置&#xff1a; 然后我们找到test.f…

常见积分和导数的推导

导数&#xff1a; 1.yarcsinxyarcsinxyarcsinx的导数&#xff1a; yarcsin⁡x→xsin⁡y→1y′cos⁡y→y′1cos⁡y→y′11−x2\\y\arcsin x\\ \rightarrow x\sin y\\ \rightarrow 1{y}\cos y\\ \rightarrow {y}\frac{1}{\cos y}\\ \rightarrow {y}\frac{1}{\sqrt{1-x^{2}}}yarc…

c语言函数调用排序用插入法,C语言:编写查找和排序函数(二分查找,冒泡排序,选择排序法,插入排序)...

任务代码&#xff1a;二分查找数组的一个数字&#xff1a;(函数法)#include int binarySearch(int a[],int len,int key){int low0,highlen-1,mid;int i-1;//相当于indexwhile(low<high){mid(lowhigh)/2;if(a[mid]key){imid;break;}else if(key>a[mid]){lowmid1;}else{hi…

常用于解决放缩问题的基本不等式及其几何直观证明

考研中遇到放缩问题就需要用到不等式&#xff1a; 一般放缩的地方就是夹逼准则&#xff0c;还有判断多元函数极限是否存在。 基本不等式&#xff1a; (调和均值 ≤ 几何均值 ≤ 算术均值 ≤ 平方均值) 当且仅当ab时等号成立。 基本不等式的几何直观证明&#xff1a; 基本不…

c语言 连接哨兵 redis6,Redis哨兵--缓存服务器

redis哨兵说明:通过缓存服务器可以有效的提升用户的访问效1.注意事项:A:缓存的数据结构应该选用K-V结构,只要K唯一那么结果必然相同B:缓存总的数据不可能一直储存,需要定期将内存数据进行优化,LRU算法....C:缓存的运行数据要求要快,C语言实现... 运行在内存中D:如果缓存运行的数…

复数和复变指数函数和三角函数和欧拉公式关系及几何直观意义

证明欧拉公式 如果这么看自变量&#xff1a;θωt\theta \omega t θωt那么就可以发现欧拉公式的几何意义。 复数的表示形式 通过下面对比可以发现&#xff0c;用复指数表示复数在几何上更直观。 复数的运算 1.加法运算 设z1abi&#xff0c;z2cdi是任意两个复数&#xf…

利用DHT22和Arduino测量温湿度并显示在串口和OLED显示屏上

实验结果 温湿度显示在串口&#xff1a; 温湿度显示在OLED屏幕&#xff1a; 实验代码 #include "U8glib.h" #include "DHT.h"U8GLIB_SSD1306_128X32 u8g(U8G_I2C_OPT_NONE); #define DHTTYPE DHT22 // DHT 22 (AM2302) #define DHTPIN 2 // wh…

Altium Designer20新建项目\导入库\绘制原理图\导入pcb\绘制pcb

1.新建项目 2.新建原理图和PCB 3.新建原理图库和pcb库 4.导入原理图库和pcb库 点击如图所示 然后点击安装&#xff0c;找到需要安装的位置&#xff0c;打开 然后在下拉框里就可以找到&#xff0c;并选择外部的库 5.绘制原理图 在Components里面选择一个库然后找元器件 然…

红魔1android版本能升到多少,红魔5G:实力全开,比快更快

红魔5G&#xff1a;实力全开&#xff0c;比快更快2020-03-20 20:37:090点赞0收藏0评论在当代年轻人的生活里&#xff0c;手游似乎已经成为必不可少的一部分&#xff1a;心情不好来一局、初次见面来一局、闲来无事来一局。各大手机厂商洞察到这一点&#xff0c;纷纷推出针对手游…

Altium Designer20原理图绘制

1.网络标签 如图所示&#xff0c;添加网络标签&#xff0c;两个相同标签连到一块 添加name&#xff0c;可以直接按TAB键改名&#xff0c;如果需要上横线&#xff0c;在字母后面加’\‘ 2.电源标识 3.画线 这里的线不是导线&#xff0c;不具有电气特性&#xff0c;是用来划…

Altium Designer20原理图库放置引脚报错解决方案

原理图库里点击放置引脚&#xff0c;然后AD20报错。 View Pin threw an exception. System.Windows.Markup.XamlParseException: 在“System.Windows.Markup.StaticResourceHolder”上提供值时引发了异常。 —> System.Exception: 无法找到名为“JustificationToAlignmen…