ESP8266进阶篇

20170225(应需要,继续使用此模块!!!)

说一下如何通过内网和外网来控制我的ESP8266的数据模块

1、内网控制:(要求手机直接连接在ESP8266的WIFI上面,使用“TCP连接”这款软件来控制ESP8266的数据,模块的设置按照之前上面的主机端的设置模式即可

这种情况下需要设置ESP8266模块为AP模式,也就是AT+CWMODE=2(AP Mode as a TCP Server),这个时候手机作为Client端,通过无线连接到AP端。如下图所示:

   

2、经过家庭WIFI无线路由器节点来让外网访问ESP8266模块,需要知道的是ESP8266的IP地址和MAC地址及其端口。

或者直接下载云盘文档链接:http://pan.baidu.com/s/1c2lAePE 密码:8zgm

上面的这篇文档,没有涉及到DMZ服务的配置,现在的路由器需要设置好DMZ服务器之后才能将本地的ESP8266模块的数据发送出去!

还可以参考这篇博客园的博客:http://www.cnblogs.com/yangfengwu/p/5295632.html

一、ESP8266的设置:AT+RST  -->   AT+CWMODE=3   -->   AT+CWLAP   -->    AT+CWJAP="ssid of Router","PassWords of Router"   -->     AT+CIFSR  -->    AT+CIPMUX=1   -->AT+CIPSERVER=1,333

复位ESP    配置为AP/Station兼容模式       列出所有AP              找到当前的无线wifi路由器,输入账户密码,加入AP       列出ESP8266的IP和MAC地址  设置为多连模式        设置服务端口

二、TP link路由器设置:

首先登陆家里的路由器界面,管理员密码

在应用管理中获得ESP8266的密码和MAC地址,同时绑定IP和MAC地址,保证每次启动的时候IP不用动态分配,保持IP不变!

在应用管理中设置启用DMZ主机服务,将ESP8266模块暴露在公网中,在DMZ主机IP地址填写之前路由器分配的IP地址即可!

在路由设置中获得路由器的外网IP地址:121.xx.xxx.xx

通过EasyTCP软件来链接我的ESP8266模块:(如下图所示)

      

手机TCP端数据发送                                                                                       ESP8266客户端数据监控

不设置路由器来实现ESP8266的控制(采用内网透传的方式实现此功能)Time:2017 02 26

本来想使用免费的内网透传软件Xtunnel软件来做实验的,我用 Sockettool软件死活是连接不上我的Xtunnel公网,没办法就注册了花生壳,交了钱拿个域名(6元)和1G的流量(10元)

注册好花生壳的域名和流量之后,我们开始建立内网透传的IP和端口:

 

下面我们开始设置ESP8266,这个设置和上面的一样,只不过我们不需要设置路由器的DMZ功能将内网主机ESP8266的IP地址和端口映射到广域网上啦~

AT

AT+RST

AT+CWLAP

AT+CWJAP="xxxx","xxxx"

AT+CIFSR

AT+CIPMUX=1

AT+CIPSERVER=1,333

设置完之后就能传输数据啦!!非常方便

基于单片机控制的ESP8266模块的实验如下:

主机端:(步骤如下)

AT固件按照之前提供的AT固件包和烧录位置来烧录即可,在失忆之前先使用串口来直接调试ESP8266是否已经烧录完成!

单片机型号是STM32C8T6,串口使用的是UART2,代码如下:

main.c文件内容

 #include "stm32f10x.h"
#include "app.h"
#include "LED.h"
#include "delay.h"
#include "oled.h" #define T 1000
unsigned char Return[]={' '};
unsigned char Clear[]={' '};
unsigned char Count=; void delayms(void)
{
int i=,j=;
for(i=;i<;i++)
{
for(j=;j<;j++) ;
}
}
int main(void)
{
unsigned char Str[]="ESP8266 & STM32C8T6!";
unsigned char i=;
char Len = ; //Server ESP8266
char Server_Step1[]="AT\r\n";
char Server_Step2[]="AT+RST\r\n";
char Server_Step3[]="AT+CWMODE=2\r\n";
char Server_Step4[]="AT+CWSAP=\"UESTC-MM\",\"1234abcd\",1,3\r\n";
char Server_Step5[]="AT+CIFSR\r\n";
char Server_Step6[]="AT+CIPMODE=0\r\n";
char Server_Step7[]="AT+CIPMUX=1\r\n";
char Server_Step8[]="AT+CIPSERVER=1,333\r\n";
unsigned char Info1[]={"SSID:UESTC-MM"};
unsigned char Info2[]={"PSWD:1234abcd"}; All_Init();
LED_init();
init_OLED();
USART2_Puts(Str);
OLED_P6x8Str(,,Str); OLED_P6x8Str(,,Info1);
OLED_P6x8Str(,,Info2);
//Command 1
USART2_Puts(Server_Step1); delayms(); delay_ms(T); delay_ms(T);
Return[Count] = '\0'; OLED_Fill();
OLED_P6x8Str(,,Return); Count = ;
for(i=;i<;i++)
{
Return[i] = ' ';
}
//Command 2
USART2_Puts(Server_Step2); delayms(); delay_ms(T); delay_ms(T);
Return[Count] = '\0'; OLED_Fill();
OLED_P6x8Str(,,Return); Count = ;
for(i=;i<;i++)
{
Return[i] = ' ';
}
//Command 3
USART2_Puts(Server_Step3); delayms(); delay_ms(T); delay_ms(T);
Return[Count] = '\0'; OLED_Fill();
OLED_P6x8Str(,,Return); Count = ;
for(i=;i<;i++)
{
Return[i] = ' ';
}
//Command 4
USART2_Puts(Server_Step4); delayms(); delay_ms(T); delay_ms(T);
Return[Count] = '\0'; //OLED_Fill(0);
OLED_P6x8Str(,,Return); Count = ;
for(i=;i<;i++)
{
Return[i] = ' ';
}
//Command 5
USART2_Puts(Server_Step5); delayms(); delay_ms(T); delay_ms(T);
Return[Count] = '\0'; OLED_Fill();
OLED_P6x8Str(,,Return); Count = ;
for(i=;i<;i++)
{
Return[i] = ' ';
}
//Command 6
USART2_Puts(Server_Step6); delayms(); delay_ms(T); delay_ms(T);
Return[Count] = '\0'; OLED_Fill();
OLED_P6x8Str(,,Return); Count = ;
for(i=;i<;i++)
{
Return[i] = ' ';
}
//Command 7
USART2_Puts(Server_Step7); delayms(); delay_ms(T); delay_ms(T);
Return[Count] = '\0'; OLED_Fill();
OLED_P6x8Str(,,Return); Count = ;
for(i=;i<;i++)
{
Return[i] = ' ';
}
//Command 8
USART2_Puts(Server_Step8); delayms(); delay_ms(T); delay_ms(T);
Return[Count] = '\0'; OLED_Fill();
OLED_P6x8Str(,,Return); Count = ;
for(i=;i<;i++)
{
Return[i] = ' ';
}
while()
{
OLED_P6x8Str(,,Return);
delay_ms();
switch(Return[]){
case '': break;
case '': OLED_Fill(); break;
case '': LED_H(); break;
case '': LED_L(); break;
default:break;
}
Count = ;
}
}

LED.c

 #include "LED.h"

 void LED_init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOB, &GPIO_InitStructure); GPIO_ResetBits(GPIOB,GPIO_Pin_5);
}
void LED_H(void)
{
GPIO_ResetBits(GPIOB,GPIO_Pin_5);
}
void LED_L(void)
{
GPIO_SetBits(GPIOB,GPIO_Pin_5);
}

LED.h

 #ifndef _LED_H_
#define _LED_H_
#include "stm32f10x.h" void LED_init(void);
void LED_H(void);
void LED_L(void); #endif

USART.c

 #include "stm32f10x.h"
#include <stdio.h> //ÏÂÃæstrlenº¯ÊýÐèÒª´ËÍ·Îļþ
#include "USART.h" /**********************************************************
** º¯ÊýÃû:u32tostr
** ¹¦ÄÜÃèÊö: ½«Ò»¸ö32λµÄ±äÁ¿datתΪ×Ö·û´®£¬±ÈÈç°Ñ1234תΪ"1234"
** ÊäÈë²ÎÊý: dat:´øתµÄlongÐ͵ıäÁ¿
str:Ö¸Ïò×Ö·ûÊý×éµÄÖ¸Õ룬ת»»ºóµÄ×Ö½Ú´®·ÅÔÚÆäÖÐ
** Êä³ö²ÎÊý: ÎÞ
***********************************************************/
void u32tostr(unsigned long dat,char *str)
{
char temp[];
unsigned char i=,j=;
i=;
while(dat)
{
temp[i]=dat%+0x30;
i++;
dat/=;
}
j=i;
for(i=;i<j;i++)
{
str[i]=temp[j-i-];
}
if(!i) {str[i++]='';}
str[i]=;
} /**********************************************************
** º¯ÊýÃû: strtou32
** ¹¦ÄÜÃèÊö: ½«Ò»¸ö×Ö·û´®×ªÎª32λµÄ±äÁ¿£¬±ÈÈç"1234"תΪ1234
** ÊäÈë²ÎÊý: str:Ö¸Ïò´ýת»»µÄ×Ö·û´®
** Êä³ö²ÎÊý: ÎÞ
** ·µ»Ø£º×ª»»ºóµÄÊýÖµ
***********************************************************/
unsigned long strtou32(char *str)
{
unsigned long temp=;
unsigned long fact=;
unsigned char len=strlen(str);
unsigned char i;
for(i=len;i>;i--)
{
temp+=((str[i-]-0x30)*fact);
fact*=;
}
return temp;
} void NVIC_Configuration(void)
{
NVIC_InitTypeDef NVIC_InitStructure;
/* Configure the NVIC Preemption Priority Bits */
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_0); /* Enable the USARTy Interrupt */
NVIC_InitStructure.NVIC_IRQChannel = USART2_IRQn;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = ;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = ;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure); } /**********************************************************
** º¯ÊýÃû: Usart_Configuration
** ¹¦ÄÜÃèÊö: ´®¿Ú1ÅäÖÃ, °üÀ¨´®¿ÚʱÖÓ£¬GPIOÅäÖÃ
** ÊäÈë²ÎÊý: ÎÞ
** Êä³ö²ÎÊý: ÎÞ
***********************************************************/
void Usart_Configuration(void)
{
GPIO_InitTypeDef GPIO_InitStructure; //GPIO¿âº¯Êý½á¹¹Ìå
USART_InitTypeDef USART_InitStructure;//USART¿âº¯Êý½á¹¹Ìå
USART_ClockInitTypeDef USART_ClockInitStructure;
//ʹÄÜ´®¿Ú1£¬GPIOA£¬AFIO×ÜÏß
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_AFIO,ENABLE);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART2,ENABLE);
/* Configure USART1 Tx (PA9) as alternate function push-pull */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2; //Pin_9
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;//PA9ʱÖÓËÙ¶È50MHz
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //¸´ÓÃÊä³ö
GPIO_Init(GPIOA, &GPIO_InitStructure);
/* Configure USART1 Rx (PA10) as input floating */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;//Pin_10
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPU; //ÉÏÀ­ÊäÈë
GPIO_Init(GPIOA, &GPIO_InitStructure); USART_InitStructure.USART_BaudRate =; //²¨ÌØÂÊ9600
USART_InitStructure.USART_WordLength = USART_WordLength_8b; //8λÊý¾Ý
USART_InitStructure.USART_StopBits = USART_StopBits_1; //1¸öֹͣλ
USART_InitStructure.USART_Parity = USART_Parity_No; //ÆæżʧÄÜ
USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; //Ó²¼þÁ÷¿ØÖÆʧÄÜ
USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; //·¢ËÍ¡¢½ÓÊÕʹÄÜ USART_ClockInitStructure.USART_Clock = USART_Clock_Disable;
USART_ClockInitStructure.USART_CPOL = USART_CPOL_Low;//¿ÕÏÐʱÖÓΪµÍµçƽ
USART_ClockInitStructure.USART_CPHA = USART_CPHA_2Edge;//ʱÖÓµÚ¶þ¸ö±ßÑؽøÐÐÊý¾Ý²¶»ñ
USART_ClockInitStructure.USART_LastBit = USART_LastBit_Disable;//×îºóһλÊý¾ÝµÄʱÖÓÂö³å²»´ÓSCLKÊä³ö USART_ClockInit(USART2, &USART_ClockInitStructure);
USART_Init(USART2, &USART_InitStructure); //³õʼ»¯½á¹¹Ìå
USART_ITConfig(USART2, USART_IT_RXNE, ENABLE); //ʹÄÜUSART2µÄÖжϹ¦ÄÜ
USART_Cmd(USART2, ENABLE); //ʹÄÜ´®¿Ú1 NVIC_Configuration();
} //¼ÓÈëÒÔÏ´úÂë,Ö§³Öprintfº¯Êý,¶ø²»ÐèҪѡÔñuse MicroLIB
/***************************START*********************/
/*
#if 1
#pragma import(__use_no_semihosting)
//±ê×¼¿âÐèÒªµÄÖ§³Öº¯Êý
struct __FILE
{
int handle;
/* Whatever you require here. If the only file you are using is */
/* standard output using printf() for debugging, no file handling */
/* is required. */
//};
/* FILE is typedef¡¯ d in stdio.h. */
//FILE __stdout;
//¶¨Òå_sys_exit()ÒÔ±ÜÃâʹÓðëÖ÷»úģʽ
//_sys_exit(int x)
//{
// x = x;
//} */
//Öض¨Òåfputcº¯Êý
int fputc(int ch, FILE *f)
{
USART2->DR = (u8) ch;
while((USART2->SR&0X40)==);//Ñ­»··¢ËÍ,Ö±µ½·¢ËÍÍê±Ï
return ch;
}
//#endif
/***************************END*********************/ /**********************************************************
** º¯ÊýÃû:USART1_Putc
** ¹¦ÄÜÃèÊö: ´®¿Ú1·¢ËÍÒ»×Ö·û
** ÊäÈë²ÎÊý: c
** Êä³ö²ÎÊý: ÎÞ
***********************************************************/
void USART2_Putc(unsigned char c)
{
USART2->DR = (u8)c; //Òª·¢Ë͵Ä×Ö·û¸³¸ø´®¿ÚÊý¾Ý¼Ä´æÆ÷
while((USART2->SR&0X40)==); //µÈ´ý·¢ËÍÍê³É
}
/**********************************************************
** º¯ÊýÃû:USART1_Puts
** ¹¦ÄÜÃèÊö: ´®¿Ú1·¢ËÍÒ»×Ö·û´®
** ÊäÈë²ÎÊý: Ö¸Õëstr
** Êä³ö²ÎÊý: ÎÞ
***********************************************************/
void USART2_Puts(char * str)
{
while(*str)
{
USART2->DR= *str++;
while((USART2->SR&0X40)==);//µÈ´ý·¢ËÍÍê³É
}
}
/**********************************************************
** º¯ÊýÃû:UART_Send_Enter
** ¹¦ÄÜÃèÊö: ´®¿Ú1·¢ËÍÒ»»»Ðзû
** ÊäÈë²ÎÊý: ÎÞ
** Êä³ö²ÎÊý: ÎÞ
***********************************************************/
void UART_Send_Enter(void)
{
USART2_Putc(0x0d);
USART2_Putc(0x0a);
}
/**********************************************************
** º¯ÊýÃû:UART_Send_Str
** ¹¦ÄÜÃèÊö: ´®¿Ú1·¢ËÍÒ»×Ö·û´®£¬´ø»Ø³µ»»Ðй¦ÄÜ
** ÊäÈë²ÎÊý: Ö¸Õës
** Êä³ö²ÎÊý: ÎÞ
***********************************************************/
void UART_Send_Str(char *s)
{ for(;*s;s++)
{
if(*s=='\n')
UART_Send_Enter();
else
USART2_Putc(*s);
}
}
/**********************************************************
** º¯ÊýÃû: UART_Put_Num
** ¹¦ÄÜÃèÊö: STM32FµÄUSART·¢ËÍÊýÖµ
** ÊäÈë²ÎÊý: dat:Òª·¢Ë͵ÄÊýÖµ
** Êä³ö²ÎÊý: ÎÞ
** ˵Ã÷£ºº¯ÊýÖлὫÊýֵתΪÏàÓ¦µÄ×Ö·û´®£¬·¢ËͳöÈ¥¡£±ÈÈç 4567 תΪ "4567"
***********************************************************/
void UART_Put_Num(unsigned long dat)
{
char temp[];
u32tostr(dat,temp);
UART_Send_Str(temp);
}
/**********************************************************
** º¯ÊýÃû: UART_Put_Inf
** ¹¦ÄÜÃèÊö: STM32FµÄUSART·¢Ë͵÷ÊÔÐÅÏ¢
** ÊäÈë²ÎÊý: inf:Ö¸ÏòÌáʾÐÅÏ¢×Ö·û´®µÄÖ¸Õë
dat:Ò»¸öÊýÖµ£¬Ç°ÃæµÄÌáʾÐÅÏ¢¾ÍÊÇÔÚ˵Ã÷Õâ¸öÊýÖµµÄÒâÒå
** Êä³ö²ÎÊý: ÎÞ
***********************************************************/
void UART_Put_Inf(char *inf,unsigned long dat)
{
UART_Send_Str(inf);
UART_Put_Num(dat);
UART_Send_Str("\n");
}

主机USART.h

 #ifndef __USART__H
#define __USART__H
#include "stm32f10x.h"
#include <string.h> void Usart_Configuration(void);
void UART_Send_Byte(char c);
void UART_Send_Enter(void); void UART_Send_Str(char *s); void UART_Put_Num(unsigned long dat);
void UART_Put_Inf(char *inf,unsigned long dat); void u32tostr(unsigned long dat,char *str);
unsigned long strtou32(char *str) ;
void USART2_Puts( char * str);
void USART2_Putc(unsigned char c);
#endif

OLED.c

 #include "stm32f10x.h"/*OLEDÏÔʾģ¿é²ÉÓõÄÊÇ4ÏßSPIͨѶ·½Ê½*/
#include "oled.h"
#include "delay.h"
#define DC_1 GPIO_SetBits(GPIOB, GPIO_Pin_1)//P2^1,Êý¾ÝÃüÁîÑ¡Ôñ¶Ë½ÓÔÚDCÒý½ÅÉÏ
#define DC_0 GPIO_ResetBits(GPIOB, GPIO_Pin_1)
#define SCLK_1 GPIO_SetBits(GPIOB, GPIO_Pin_12)//P2^2,ʱÖÓÏß½ÓÔÚDOÒý½ÅÉÏ
#define SCLK_0 GPIO_ResetBits(GPIOB, GPIO_Pin_12)
#define DACO_1 GPIO_SetBits(GPIOB, GPIO_Pin_11)//P2^3,´®ÐÐÊý¾ÝÏß½ÓÔÚD1Òý½ÅÉÏ
#define DACO_0 GPIO_ResetBits(GPIOB, GPIO_Pin_11)
#define REST_1 GPIO_SetBits(GPIOB, GPIO_Pin_10)//P2^0,¸´Î»Ïß½ÓÔÚRESTÉÏ
#define REST_0 GPIO_ResetBits(GPIOB, GPIO_Pin_10)
uchar OLED_GRAM[][];
const uchar F14x16_Idx[] =
{
"ÂííµÆÁÄ»²âÊÔ¿ªÊ¼"
};
const uchar F14x16[] =
{
0x00,0x00,0x00,0x04,0xFC,0x04,0x04,0x04,0x84,0x7C,0x00,0x00,0x00,0x00,
0x00,0x00,0x08,0x08,0x08,0x09,0x09,0x09,0x08,0xC5,0x49,0x3F,0x00,0x00,/*"Âí",0*/
0x00,0x00,0x40,0x28,0x98,0x40,0xF4,0x0A,0x18,0xA8,0x24,0x40,0x00,0x00,
0x00,0x32,0x4E,0xC2,0x7F,0x5A,0x31,0x4E,0x42,0x7F,0x0C,0x12,0x21,0x00,/*"íµ",1*/
0x00,0x00,0xFE,0x14,0x94,0x94,0xF4,0x94,0x94,0xF4,0xB4,0x9C,0x00,0x00,
0x00,0x30,0x0F,0x84,0x44,0x34,0x0F,0x04,0x04,0x7F,0x04,0x04,0x04,0x00,/*"ÆÁ",2*/
0x00,0x04,0x04,0xF4,0xB4,0xAE,0xB4,0xB4,0xAE,0xAC,0xF4,0x04,0x04,0x00,
0x00,0x08,0x0A,0x36,0x0A,0x09,0x7E,0x0A,0x0A,0x7A,0x0E,0x0A,0x09,0x00,/*"Ä»",3*/
0x00,0x20,0x04,0xC0,0xFC,0x04,0xF4,0x04,0xFC,0x00,0xF0,0xFC,0x00,0x00,
0x00,0x00,0x7F,0x40,0x27,0x18,0x07,0x10,0x67,0x00,0x0F,0x7F,0x00,0x00,/*"²â",4*/
0x00,0x80,0x8C,0x90,0x20,0x20,0x20,0x20,0xA0,0xFE,0x20,0x2C,0x10,0x00,
0x00,0x00,0x00,0x7F,0x18,0x20,0x21,0x1F,0x10,0x13,0x0C,0x30,0x70,0x00,/*"ÊÔ",5*/
0x00,0x84,0x84,0x84,0xFC,0x84,0x84,0x84,0x84,0xFC,0x84,0x86,0x80,0x00,
0x00,0x40,0x20,0x10,0x0F,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,/*"¿ª",6*/
0x00,0x00,0xF0,0x2E,0xA0,0x70,0x40,0x70,0x4C,0x42,0x40,0x50,0xE0,0x00,
0x00,0x43,0x24,0x18,0x0F,0x30,0x00,0x7E,0x42,0x42,0x42,0x7F,0x02,0x00,/*"ʼ",7*/
};
/*const uchar F14x16_Idx[21] = //ÿ¸öºº×ÖÕ¼Á½¸ö×Ö½Ú£¬Ã¿¸ö×Ö·û´®×îºóÃ涼ÓÐÖÕÖ¹·û\n£¬ÖÕÖ¹·ûΪcharÐÍÕ¼Ò»¸ö×Ö½Ú
{ //ËùÒÔ£¬ucharÐÍÊý×éµÄÊý×éÔªËظöÊý=ºº×Ö¸öÊý*2×Ö½Ú+1¸öÖÕÖ¹·û×Ö½Ú=21
"ÐÅÒâµç×ӿƼ¼ÆÁÄ»²âÊÔ" //¸ÃÊý×éÓõÄÊÇunsigned charÐÍ£¬ËùÒÔÿ¸öÊý×éÔªËصı仯·¶Î§ÊÇ0~255
};
const uchar F14x16[] =
{
0x00,0x80,0xE0,0x1C,0x12,0x10,0x50,0x52,0x4C,0x50,0x50,0x30,0x08,0x00,
0x01,0x00,0x7F,0x00,0x00,0x01,0x7D,0x45,0x45,0x45,0x45,0x7C,0x00,0x00,//"ÐÅ",0
0x00,0x20,0x20,0xA8,0xA8,0xB8,0xA6,0xA8,0xB8,0x68,0xA8,0x20,0x20,0x00,
0x00,0x40,0x30,0x0F,0x76,0x46,0x4E,0x56,0x46,0x76,0x17,0x10,0x60,0x00,//"Òâ",1
0x00,0x00,0xF0,0x90,0x90,0x90,0xFE,0x90,0x90,0x90,0xF0,0x10,0x00,0x00,
0x00,0x00,0x0F,0x08,0x08,0x08,0x7F,0x48,0x48,0x48,0x4F,0x50,0x60,0x00,//"µç",2
0x00,0x00,0x04,0x04,0x04,0x04,0x04,0xE4,0x14,0x0C,0x04,0x84,0x80,0x00,
0x00,0x00,0x01,0x01,0x01,0x41,0x41,0x3F,0x01,0x01,0x01,0x00,0x00,0x00,//"×Ó",3
0x00,0x00,0x48,0xFC,0x44,0x42,0x00,0x88,0x30,0x00,0xFE,0x02,0x00,0x00,
0x00,0x0C,0x02,0x7F,0x01,0x01,0x08,0x08,0x05,0x04,0xFF,0x04,0x02,0x00,//"¿Æ",4
0x00,0x00,0x20,0xFE,0x20,0x90,0x20,0x20,0x20,0xFE,0x20,0xA0,0x10,0x00,
0x00,0x02,0x41,0x7F,0x81,0x80,0x41,0x47,0x29,0x18,0x27,0x41,0x40,0x00,//"¼¼",5
0x00,0x00,0xFE,0x14,0x14,0x34,0x54,0x14,0x94,0x74,0x14,0x9C,0x00,0x00,
0x00,0x30,0x0F,0x88,0x48,0x39,0x0F,0x09,0x08,0x7F,0x09,0x04,0x04,0x00,//"ÆÁ",6
0x00,0x04,0x04,0xF4,0x54,0xCE,0x54,0x54,0x4E,0x4C,0xF4,0x04,0x04,0x00,
0x00,0x08,0x0A,0x3E,0x0A,0x09,0x7E,0x0A,0x0A,0x7A,0x0E,0x0A,0x09,0x00,//"Ä»",7
0x00,0x20,0x04,0x80,0xFC,0x04,0xF4,0x04,0xFC,0x00,0xF0,0xFC,0x00,0x00,
0x00,0x00,0x7F,0x40,0x27,0x18,0x07,0x10,0x67,0x00,0x4F,0xFF,0x00,0x00,//"²â",8
0x00,0x80,0x88,0x98,0x20,0x20,0x20,0x20,0xA0,0xFE,0x24,0x2C,0x10,0x00,
0x00,0x00,0x1F,0x60,0x10,0x28,0x21,0x1F,0x10,0x13,0x1C,0x20,0x70,0x00,//"ÊÔ",9
};*/
const uchar F8X16[]=
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//
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,///
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//
0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//
0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//
0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,//
0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,//
0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,//
0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,//
0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,//
0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,//
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,//A33
0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//B34
0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//C35
0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//D36
0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//E37
0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//F38
0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//G39
0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//H40
0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//I41
0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//J42
0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//K43
0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//L44
0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,//M45
0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//N46
0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//O47
0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//P48
0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,//Q49
0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//R50
0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//S51
0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//T52
0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//U53
0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//V54
0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,//W55
0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//X56
0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//Y57
0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//Z58
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,//a65
0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//b66
0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//c67
0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,//d68
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e69
0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//f70
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//g71
0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//h72
0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//i73
0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//j74
0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,//k75
0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//l76
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m77
0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//n78
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//o79
0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,//p80
0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,//q81
0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//r82
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//s83
0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,//t84
0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//u85
0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,//v86
0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,//w87
0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,//x88
0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,//y89
0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//z90
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
};
const unsigned char F6x8[][] = //±ê×¼ASCII×Ö·û´®
{
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, //sp0
{ 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00 }, // !1
{ 0x00, 0x00, 0x07, 0x00, 0x07, 0x00 }, // "2
{ 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14 }, // #3
{ 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12 }, // $4
{ 0x00, 0x62, 0x64, 0x08, 0x13, 0x23 }, // %5
{ 0x00, 0x36, 0x49, 0x55, 0x22, 0x50 }, // &6
{ 0x00, 0x00, 0x05, 0x03, 0x00, 0x00 }, // '7
{ 0x00, 0x00, 0x1c, 0x22, 0x41, 0x00 }, // (8
{ 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00 }, // )9
{ 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14 }, // *10
{ 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08 }, // +11
{ 0x00, 0x00, 0x00, 0xA0, 0x60, 0x00 }, // ,12
{ 0x00, 0x08, 0x08, 0x08, 0x08, 0x08 }, // -13
{ 0x00, 0x00, 0x60, 0x60, 0x00, 0x00 }, // .14
{ 0x00, 0x20, 0x10, 0x08, 0x04, 0x02 }, // /15
{ 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E }, //
{ 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00 }, //
{ 0x00, 0x42, 0x61, 0x51, 0x49, 0x46 }, //
{ 0x00, 0x21, 0x41, 0x45, 0x4B, 0x31 }, //
{ 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10 }, //
{ 0x00, 0x27, 0x45, 0x45, 0x45, 0x39 }, //
{ 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30 }, //
{ 0x00, 0x01, 0x71, 0x09, 0x05, 0x03 }, //
{ 0x00, 0x36, 0x49, 0x49, 0x49, 0x36 }, //
{ 0x00, 0x06, 0x49, 0x49, 0x29, 0x1E }, //
{ 0x00, 0x00, 0x36, 0x36, 0x00, 0x00 }, // :26
{ 0x00, 0x00, 0x56, 0x36, 0x00, 0x00 }, // ;27
{ 0x00, 0x08, 0x14, 0x22, 0x41, 0x00 }, // <28
{ 0x00, 0x14, 0x14, 0x14, 0x14, 0x14 }, // =29
{ 0x00, 0x00, 0x41, 0x22, 0x14, 0x08 }, // >30
{ 0x00, 0x02, 0x01, 0x51, 0x09, 0x06 }, // ?31
{ 0x00, 0x32, 0x49, 0x59, 0x51, 0x3E }, // @32
{ 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C }, // A33
{ 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36 }, // B34
{ 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22 }, // C35
{ 0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C }, // D36
{ 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41 }, // E37
{ 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01 }, // F38
{ 0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A }, // G39
{ 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F }, // H40
{ 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00 }, // I41
{ 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01 }, // J42
{ 0x00, 0x7F, 0x08, 0x14, 0x22, 0x41 }, // K43
{ 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40 }, // L44
{ 0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F }, // M45
{ 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F }, // N46
{ 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E }, // O47
{ 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06 }, // P48
{ 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E }, // Q49
{ 0x00, 0x7F, 0x09, 0x19, 0x29, 0x46 }, // R50
{ 0x00, 0x46, 0x49, 0x49, 0x49, 0x31 }, // S51
{ 0x00, 0x01, 0x01, 0x7F, 0x01, 0x01 }, // T52
{ 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F }, // U53
{ 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F }, // V54
{ 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F }, // W55
{ 0x00, 0x63, 0x14, 0x08, 0x14, 0x63 }, // X56
{ 0x00, 0x07, 0x08, 0x70, 0x08, 0x07 }, // Y57
{ 0x00, 0x61, 0x51, 0x49, 0x45, 0x43 }, // Z58
{ 0x00, 0x00, 0x7F, 0x41, 0x41, 0x00 }, // [59
{ 0x00, 0x02, 0x04, 0x08, 0x10, 0x20 }, // \60
{ 0x00, 0x00, 0x41, 0x41, 0x7F, 0x00 }, // ]61
{ 0x00, 0x04, 0x02, 0x01, 0x02, 0x04 }, // ^62
{ 0x00, 0x40, 0x40, 0x40, 0x40, 0x40 }, // _63
{ 0x00, 0x00, 0x01, 0x02, 0x04, 0x00 }, // '64
{ 0x00, 0x20, 0x54, 0x54, 0x54, 0x78 }, // a65
{ 0x00, 0x7F, 0x48, 0x44, 0x44, 0x38 }, // b66
{ 0x00, 0x38, 0x44, 0x44, 0x44, 0x20 }, // c67
{ 0x00, 0x38, 0x44, 0x44, 0x48, 0x7F }, // d68
{ 0x00, 0x38, 0x54, 0x54, 0x54, 0x18 }, // e69
{ 0x00, 0x08, 0x7E, 0x09, 0x01, 0x02 }, // f70
{ 0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C }, // g71
{ 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78 }, // h72
{ 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00 }, // i73
{ 0x00, 0x40, 0x80, 0x84, 0x7D, 0x00 }, // j74
{ 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00 }, // k75
{ 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00 }, // l76
{ 0x00, 0x7C, 0x04, 0x18, 0x04, 0x78 }, // m77
{ 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78 }, // n78
{ 0x00, 0x38, 0x44, 0x44, 0x44, 0x38 }, // o79
{ 0x00, 0xFC, 0x24, 0x24, 0x24, 0x18 }, // p80
{ 0x00, 0x18, 0x24, 0x24, 0x18, 0xFC }, // q81
{ 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08 }, // r82
{ 0x00, 0x48, 0x54, 0x54, 0x54, 0x20 }, // s83
{ 0x00, 0x04, 0x3F, 0x44, 0x40, 0x20 }, // t84
{ 0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C }, // u85
{ 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C }, // v86
{ 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C }, // w87
{ 0x00, 0x44, 0x28, 0x10, 0x28, 0x44 }, // x88
{ 0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C }, // y89
{ 0x00, 0x44, 0x64, 0x54, 0x4C, 0x44 }, // z90
{ 0x14, 0x14, 0x14, 0x14, 0x14, 0x14 } // horiz lines91
};
void init_OLED(void)
{
OLED_IO_Config();
REST_0;
SCLK_1;
delay_ms();
REST_1;
OLED_writecom(0xae); OLED_writecom(0x00);
OLED_writecom(0x10); OLED_writecom(0x40);
OLED_writecom(0xcf); OLED_writecom(0xa1);
OLED_writecom(0xc8); OLED_writecom(0xa6);
OLED_writecom(0xa8); OLED_writecom(0x3f);
OLED_writecom(0xd3); OLED_writecom(0x00);
OLED_writecom(0xd5); OLED_writecom(0x80);
OLED_writecom(0xd9); OLED_writecom(0xf1);
OLED_writecom(0xda); OLED_writecom(0x12);
OLED_writecom(0xdb); OLED_writecom(0x40);
OLED_writecom(0x20); OLED_writecom(0x02);
OLED_writecom(0x8d); OLED_writecom(0x14);
OLED_writecom(0xa4); OLED_writecom(0xa6);
OLED_writecom(0xaf); OLED_Fill(0x00);
OLED_Set_Pos(,);
}
void OLED_IO_Config(void)
{
GPIO_InitTypeDef GPIO_InitStructure; //¶¨ÒåGPIO½á¹¹Ìå RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);//ʹÄÜGPIOA¡¢GPIOB¿ÚʱÖÓ /*½«PB0,PB1ÅäÖÃΪÍÆÍìÊä³ö*/
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_11|GPIO_Pin_12|GPIO_Pin_1|GPIO_Pin_10;//PB1¡¢PB0
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //ÍÆÍìÊä³ö
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; //50MʱÖÓËÙ¶È
GPIO_Init(GPIOB, &GPIO_InitStructure); }
void OLED_writedat(uchar data)
{
uchar i = ;
DC_1;
SCLK_0;
while (i--)
{
if (data & 0x80)//È¡×î¸ßλ
{
DACO_1;
}
else
{
DACO_0;
}
SCLK_1;
delay_us();
SCLK_0;
data <<= ;
}
return;
}
void OLED_writecom(uchar com)
{
unsigned char i = ;
DC_0;
SCLK_0;
while (i--)
{
if (com & 0x80)
{
DACO_1;
}
else
{
DACO_0;
}
SCLK_1;//ϽµÑØÊäÈëÐźÅ
delay_us();
SCLK_0;
com <<= ;//ÒÆλÊäÈë
} return;
}
/*void OLED_display_on(void)//¿ªÆôOLEDÏÔʾ
{
OLED_writecom(0x8d);//µçºÉ±ÃÉèÖ㬱ØÐë³õʼ»¯
OLED_writecom(0x14);//ÉèÖøßËÄλµÄµØÖ·
OLED_writecom(0xaf);//ÉèÖÃÏÔʾ¿ª¹Ø£¬¼´X0=1¿ªÆôÏÔʾ
}
void OLED_display_off(void)//¹Ø±ÕOLEDÏÔʾ
{
OLED_writecom(0x8d);//µçºÉ±ÃÉèÖ㬱ØÐë³õʼ»¯
OLED_writecom(0x14);//ÉèÖøßËÄλµÄµØÖ·
OLED_writecom(0xae);//ÉèÖÃÏÔʾ¿ª¹Ø£¬¼´X0=0¿ªÆôÏÔʾ
}
void OLED_clear(void)//ÇåÆÁº¯Êý
{
for(uchar i=0;i<8;i++)
for(uchar n=0;i<128;i++)
OLED_GRAM[n][i]=0xff;
OLED_refresh();//¸üÐÂÏÔʾ
}
void OLED_drawpoint(uchar x,uchar y,uchar CF)//¸Ä±äÁËOLED_SRAMÖÐijһ¸öÔªËصÄ1bitÊý¾Ý£¬¼´¸Ä±äÁËÒ»¸öÏñËصãµÄÏÔʾ״̬
{
uchar POS,BX,TEMP;
if(x>127||y>63) return;//³¬³öÏÔʾ·¶Î§
POS=7-y/8;
BX=y%8;
TEMP=1<<(7-BX);
if(CF) OLED_GRAM[x][POS]|=TEMP;
else OLED_GRAM[x][POS]&=~TEMP;
}
void OLED_fill_dig(uchar X0,uchar Y0,uchar X1,uchar Y1,uchar CF)//ÔÚOLEDÉÏ»­Ö±Ïß
{
for(uchar i=X0;i<=X1;i++)
for(uchar j=Y0;j<Y1;j++)
{
OLED_drawpoint(i,j,CF);
}
OLED_refresh();
}
void OLED_refresh(void)
{
for(uchar i=0;i<8;i++)
{
OLED_writecom(0xb0+i);//ÉèÖõØÖ·Ò³£¬Öð´ÎµÝÔö
OLED_writecom(0x02);//дÏÔʾλÖ᪡ªÁе͵ØÖ·£¬Æ«ÒÆÁ½ÁÐ
OLED_writecom(0x10);//дÏÔʾλÖ᪡ªÁиߵØÖ·
for(uchar n=0;n<128;n++)
OLED_writedat(OLED_GRAM[n][i]);
}
}*/
void OLED_CLS(void)//¸´Î»º¯Êý
{
unsigned char y,x;
for(y=;y<;y++)
{
OLED_writecom(0xb0+y);
OLED_writecom(0x01);
OLED_writecom(0x10);
for(x=;x<;x++)
OLED_writedat();
}
}
void OLED_Fill(uchar bmp_dat)//ÉèÖÃOLEDÏÔʾȫÆÁ·ñ (¿ÉÓÃ×÷ÇåÆÁ)
{
unsigned char y,x;
for(y=;y<;y++)
{
OLED_writecom(0xb0+y);
OLED_writecom(0x01);
OLED_writecom(0x10);
for(x=;x<;x++)
OLED_writedat(bmp_dat);
}
}
void OLED_Set_Pos(uchar x, uchar y) //ÉèÖÃ×ø±êλÖÃ
{
OLED_writecom(0xb0+y);
OLED_writecom(((x&0xf0)>>)|0x10);
OLED_writecom((x&0x0f)|0x01);
}
void OLED_P6x8Str(uchar x,uchar y,uchar ch[])//±ê×¼ASCII×Ö·û´®ÏÔʾº¯Êý
{ //´Ëº¯Êý×ÓÓÃÀ´ÏÔʾASCII×Ö·û´®
uchar c=,i=,j=;
while (ch[j]!='\0') //×Ö·û´®ÅжÏÊÇ·ñ½áÊø
{
c=ch[j]-;//
if(x>) {x=;y++;} //µ±ÏÔʾʱ£¬ºáÐг¬¹ý128ʱ¾Íתµ½ÏÂÒ»ÐÐy++¡£
OLED_Set_Pos(x,y); //ÉèÖÃÊä³öλÖÃ×ø±ê
for(i=;i<;i++)
OLED_writedat(F6x8[c][i]); //дÊý¾Ý£¨Ò»ÐдúÂë´ú±íÒ»¸öASCIIÂëÖµ£©
x+=;//ÿ¸öASCIIÕ¼¾Ý6*8¸öÏñËص㣬ËùÒÔ¼Ó6
j++;
}
}
void OLED_P6x8Char(uchar X, uchar Y,uchar Data)//ÏÔʾһ¸ö×Ö·ûµÄº¯Êý
{
uchar i,ucDataTmp;
ucDataTmp=Data-;
if(X > )
{
X = ;
Y++;
}
OLED_Set_Pos(X,Y);
for(i=;i<;i++)
{
OLED_writedat(F6x8[ucDataTmp][i]);
}
}
void OLED_P8x16Str(uchar X,uchar Y,uchar ucDataStr[])
{
uchar i,j,ucDataTmp;
Y<<=;
for (j=;ucDataStr[j]!='\0';j++)
{
ucDataTmp=ucDataStr[j]-;
if(X>)//ÿ¸ö×Ö·ûÕ¼ÓõÄÏñËصãÊýΪx=8£»y=16
{
X=;
Y+=;
}
OLED_Set_Pos(X,Y);
for(i = ; i < ; i++)
{
OLED_writedat(F8X16[(ucDataTmp << ) + i]);
}
OLED_Set_Pos(X,Y+);
for(i=;i<;i++)
{
OLED_writedat(F8X16[(ucDataTmp << ) + i + ]);
}
X+=;
}
return;
}
void OLED_P14x16Str(uchar X,uchar Y,uchar ucDataStr[])//ÏÔʾºº×Öº¯Êý£¬´Ëº¯Êý½«Ò»¸öºº×Ö´ÓÉÏÏ·ÖΪÁ½°ëÀ´
{ //дÈëµ½OLEDÖУ¬Ã¿°ë¸öºº×ÖÓÉ14¸ö×ÖÄ£Êý×éÖеÄÔªËØ
uchar i, j; //À´ÃèÊö£¬Òò´ËÒªÉèÖÃÁ½´ÎSET_POS²Å¿ÉÒÔ
unsigned short usAddress;
Y <<= ;//¸ø×ø±êY³ËÒÔ¶þ£¬´Ó¶øÕýÈ·È·¶¨ÏÔʾλÖÃ
j = ;
while(ucDataStr[j]!='\0')//ÅжÏÊÇ·ñÏÔʾÍê±Ï
{
i = ;
usAddress = ;
while(F14x16_Idx[i] > )//ÿ¸öÊý×éµÄ±ä»¯·¶Î§ÊÇ£º0~225£¨unsigned charÐÍ£©
{
if(F14x16_Idx[i] == ucDataStr[j])//ÿ¸öºº×ÖÊÇÓÉÁ½¸ö×Ö½Ú£¨charÐÍ£©×é³ÉµÄ
{
if(F14x16_Idx[i + ] == ucDataStr[j + ])//Á½´ÎifÓï¾äÈ·ÈÏÁ˵ÚiλµÄÁ½Î»ºº×ÖÏàͬ
{
usAddress = i * ; //µÚiλºº×Ö*14µÃµ½µØÖ·usAddress
break;//Ìø³öbreakËùÊôÑ­»·£¬¼´ÎªÄÚ²ãµÄwhile£¨...>127£©
}
}
i += ;//i×Ô¼Ó2£¬Ìøµ½ÏÂһλºº×ֵijõʼµØÖ·
}
if(X > )//ÏÖÔÚÒ»¸öºº×ÖËùÕ¼ÓеÄÏñËصãÊýΪ14*16¸ö
{
X = ;
Y += ;//YÔÚOLED_set_POSÖеĵ¥Î»²½½øΪ1¸ö×Ö½Ú£¨8룩£¬ÏÖÔÚÿ¸öºº×Ö¸ßλ16bit£¬ËùÒÔ¡£¡£
}
if(usAddress != )// ÏÔʾºº×Ö
{
OLED_Set_Pos(X,Y);//ÏÔʾÉÏ°ë¿éºº×Ö
for(i =; i<;i++)
{
OLED_writedat(F14x16[usAddress]);
usAddress++;
}
OLED_Set_Pos(X,Y+);//ÏÔʾÏ°ë¿éºº×Ö
for(i = ;i < ;i++)
{
OLED_writedat(F14x16[usAddress]);
usAddress++;
}
j += ;
}
else //ÏÔʾ¿Õ°××Ö·û
{
OLED_Set_Pos(X,Y);
for(i = ;i < ;i++)//дÁËÒ»¸öÊý×ֵĿí¶È¾Í½áÊø
{
OLED_writedat();
}
OLED_Set_Pos(X,Y+);//ÔÚÏÂÒ»Ò³¼ÌÐøд
for(i = ;i < ;i++)
{
OLED_writedat();
}
j++;
}
X+=;//ÿִÐÐÒ»´ÎwhileµÄÍâÑ­»·£¬x¶¼»á¼Ó14£¬ÒòΪÿ¸öºº×Ö¿í¶È14
}
return;
}
void OLED_PrintChar(uchar ucIdxX,uchar ucIdxY,unsigned short cData)//ÏÔʾunsigned shortÐÍËù¶ÔÓ¦µÄÊý×Ö
{
unsigned short i, j, k, usData; if(cData < )
{
OLED_P6x8Char(ucIdxX, ucIdxY, '-');
usData = (unsigned short)(-cData);
}
else
{
OLED_P6x8Char(ucIdxX, ucIdxY, '+');
usData = (unsigned short)cData;
}
i = usData / ;
j = (usData % ) / ;
k = usData % ; OLED_P6x8Char(ucIdxX+, ucIdxY, i+);//iÊÇcharÐÍÊý¾Ý+48Ö®ºó±ä³ÉASCIIÖеÄDECÊ®½øÖÆÊý¾Ý
OLED_P6x8Char(ucIdxX+, ucIdxY, j+);
OLED_P6x8Char(ucIdxX+, ucIdxY, k+);
return;
}

OLED.h

 #define uint unsigned int
#define uchar unsigned char
void OLED_IO_Config(void);
void init_OLED(void);
void OLED_writedat(uchar data);
void OLED_writecom(uchar com);
void OLED_display_on(void);
void OLED_display_off(void);
void OLED_clear(void);
void OLED_drawpoint(uchar x,uchar y,uchar CF);
void OLED_fill_dig(uchar X0,uchar Y0,uchar X1,uchar Y1,uchar CF);
void OLED_refresh(void);
void OLED_CLS(void);
void OLED_Set_Pos(uchar x,uchar y);
void OLED_Fill(uchar bmp_dat);
void OLED_P6x8Str(uchar x,uchar y,uchar ch[]);
void OLED_Set_Pos(uchar x, uchar y);
void OLED_P6x8Char(uchar X, uchar Y,uchar Data);
void OLED_P8x16Str(uchar X,uchar Y,uchar ucDataStr[]);
void OLED_P14x16Str(uchar X,uchar Y,uchar ucDataStr[]);
void OLED_PrintChar(uchar ucIdxX,uchar ucIdxY,unsigned short cData);

stm32f10x_it.c

 #include "stm32f10x_it.h"
#include "USART.h"
#include "app.h"
#include "oled.h" extern unsigned char Return[];
extern unsigned char Count; void USART2_IRQHandler(void)
{
if(USART_GetITStatus(USART2, USART_IT_RXNE) != RESET)
{
Return[Count]= USART2->DR;
Count+=;
if(Count>=) Count = ;
}
}

直接使用USB-TLL串口模块来操作,AT指令和主机端的设置一样

使用EasyTCP软件来连接ESP8266的设备,IP地址通过查看OLED显示的信息为192.168.4.1,端口设置为333,所以连接的结果如下

       

 

程序中通过发送2来开启STM32上的LED,相反通过发送3来关闭STM32上的LED!

注(很重要,一定要注意):

    在收到来自手机的消息时,ESP8266-01芯片将会把得到的数据通过连接到单片机的串口发送到单片机STM32中,这样就会触发单片机的数据接收中断:

void USART2_IRQHandler(void)在中断中数据获取的方式是每次中断都只读取一个byte的数据,所以ESP8266得到的数据如下:+IPD,0,1,:2 这就是收到了一个2数据,2所在的位置是11,因此将数据保存在DATA[200],那么我们需要的数据就是DATA[11],但是为了保证中断接受程序能够完整的接收完整个这一段字符串:"+IPD,0,1,:2",需要等待一定的时间才能完成数据的发送,所以while中需要长时间停在delay_ms的进程中,等待中断读取完整个数据,然后在让Count清零。

 delay_ms(100);

NodeMCU简单使用(2017-04-26):

今天买了块小板子本来是用来买个完整的,所有GPIO都接粗来的ESP8266的板子来玩的,结果没啥资料,看某宝下面的资料就给了个链接,点进去一看全英文...(NodeMCU官网),呀呀呀还不错啊Lua语言开发ESP8266,这玩意贼溜,于是就网上找了找这方面的资料,不得不说的是这ESP8266小芯片不愧称为 麻雀虽小五脏俱全啊~参照这网站入门NodeMCU真棒~   http://benlo.com/esp8266/esp8266QuickStart.html

NodeMCU固件程序源代码:https://github.com/nodemcu/nodemcu-firmware

下面是在CSDN的博主发布的文章,感觉入门很好~(链接如下:http://blog.csdn.net/dingzz/article/details/46876503

 1 wifi.setmode(wifi.STATION)
2 wifi.sta.config("YOUR_NETWORK_NAME","YOUR_NETWORK_PASSWORD")
3 print(wifi.sta.getip())
4 led1 = 0
5 led2 = 4
6 gpio.mode(led1, gpio.OUTPUT)
7 gpio.mode(led2, gpio.OUTPUT)
8 srv=net.createServer(net.TCP)
9 srv:listen(80,function(conn)
10 conn:on("receive", function(client,request)
11 local buf = "";
12 local _, _, method, path, vars = string.find(request, "([A-Z]+) (.+)?(.+) HTTP");
13 if(method == nil)then
14 _, _, method, path = string.find(request, "([A-Z]+) (.+) HTTP");
15 end
16 local _GET = {}
17 if (vars ~= nil)then
18 for k, v in string.gmatch(vars, "(%w+)=(%w+)&*") do
19 _GET[k] = v
20 end
21 end
22 buf = buf.."<h1> ESP8266 Web Server</h1>";
23 buf = buf.."<p>GPIO16 <a href=\"?pin=ON1\"><button>OFF</button></a> <a href=\"?pin=OFF1\"><button>ON</button></a></p>";
24 buf = buf.."<p>GPIO2 <a href=\"?pin=ON2\"><button>OFF</button></a> <a href=\"?pin=OFF2\"><button>ON</button></a></p>";
25 local _on,_off = "",""
26 if(_GET.pin == "ON1")then
27 gpio.write(led1, gpio.HIGH);
28 elseif(_GET.pin == "OFF1")then
29 gpio.write(led1, gpio.LOW);
30 elseif(_GET.pin == "ON2")then
31 gpio.write(led2, gpio.HIGH);
32 elseif(_GET.pin == "OFF2")then
33 gpio.write(led2, gpio.LOW);
34 end
35 client:send(buf);
36 client:close();
37 collectgarbage();
38 end)
39 end)

我们将以上代码的第二行的YOUR_NETWORK_NAME与YOUR_NETWORK_PASSWORD分别替换成我们自己的无线热点的名称和密码,然后通过LuaLoader程序调试工具的Upload FIle...按钮来上传到NodeMcu板子,最后按dofile执行刚才上传的程序。

代码稍有改动,可能我和CSDN版主的芯片的外围电路不同吧,主要改了HTML部分的按键部分,还有就是按键的接口(0--->GPIO16  &  4--->GPIO2),下面是我的购买链接:https://detail.tmall.com/item.htm?id=44766400092&spm=a1z09.2.0.0.WdMqyB&_u=q1gpmsvhc513

看看实物图吧~(想想再使用之前介绍的花生壳域名来做个内网透传就阔以使用外网来访问控制这个超小型的Web Server啦!!)

    

ESP8266高级篇地址:

http://www.cnblogs.com/uestc-mm/p/6811714.html

ESP8266进阶篇的更多相关文章

  1. ESP8266基础篇

    ESP8266基础篇 模块刚到如图所示~2016-01-26 后三张是手机APP的截图,前面是两个ESP8266的硬件模块,当然大家不应定要买两个,自己焊锡一个USB转TTL的串口就行了,有了下面的底 ...

  2. ESP8266开发之旅 进阶篇② 闲聊Arduino IDE For ESP8266烧录配置

    授人以鱼不如授人以渔,目的不是为了教会你具体项目开发,而是学会学习的能力.希望大家分享给你周边需要的朋友或者同学,说不定大神成长之路有博哥的奠基石... QQ技术互动交流群:ESP8266&3 ...

  3. Membership三步曲之进阶篇 - 深入剖析Provider Model

    Membership 三步曲之进阶篇 - 深入剖析Provider Model 本文的目标是让每一个人都知道Provider Model 是什么,并且能灵活的在自己的项目中使用它. Membershi ...

  4. idea 插件的使用 进阶篇

    CSDN 2016博客之星评选结果公布    [系列直播]零基础学习微信小程序!      "我的2016"主题征文活动   博客的神秘功能 idea 插件的使用 进阶篇(个人收集 ...

  5. 2. web前端开发分享-css,js进阶篇

    一,css进阶篇: 等css哪些事儿看了两三遍之后,需要对看过的知识综合应用,这时候需要大量的实践经验, 简单的想法:把qq首页全屏另存为jpg然后通过ps工具切图结合css转换成html,有无从下手 ...

  6. windows系统快捷操作の进阶篇

    上次介绍了windows系统上一些自带的常用快捷键,有些确实很方便,也满足了我们的一部分需求.但是我们追求效率的步伐怎会止步于此?这一次我将会进一步介绍windows上提升效率的方法. 一:运行 打开 ...

  7. python 面向对象(进阶篇)

    上一篇<Python 面向对象(初级篇)>文章介绍了面向对象基本知识: 面向对象是一种编程方式,此编程方式的实现是基于对 类 和 对象 的使用 类 是一个模板,模板中包装了多个“函数”供使 ...

  8. 最快让你上手ReactiveCocoa之进阶篇

    前言 由于时间的问题,暂且只更新这么多了,后续还会持续更新本文<最快让你上手ReactiveCocoa之进阶篇>,目前只是简短的介绍了些RAC核心的一些方法,后续还需要加上MVVM+Rea ...

  9. SQL Server调优系列进阶篇(查询优化器的运行方式)

    前言 前面我们的几篇文章介绍了一系列关于运算符的基础介绍,以及各个运算符的优化方式和技巧.其中涵盖:查看执行计划的方式.几种数据集常用的连接方式.联合运算符方式.并行运算符等一系列的我们常见的运算符. ...

随机推荐

  1. Python yield使用浅析

    yield可将一个函数变成生成器,每次调用时,返回yield的结果,下次迭代时,从yield 下条语句开始执行. 一个典型的例子,斐波拉切数列: def fab(max): n, a, b = 0, ...

  2. nginx代理跨域(mac)

    首先找到nginx.conf文件,修改并添加如下配置 html 文件 <!DOCTYPE html> <html lang="en"> <head&g ...

  3. 用D3.js画的人物关系demo

    代码下载地址:https://github.com/zhangzn3/group-explorer ### Demo1功能 *** * 支持节点拖拽 * 支持节点拖拽并固定位置 * 支持鼠标浮到节点显 ...

  4. laravel 不理解的call方法

    返回结果: 原来是调用同控制器的这四个方法之一...vendor\zhiyicx\plus-question\src\API2\Controllers\UserQuestionController.p ...

  5. unity 3D 学习笔记

    1.父对象的初始位置设,即刚开始的空对象的根节点位置应当设置成(0,0,0) 这样设置可以避免以后出现奇怪的坐标. GameObject实际上就是一些组件的容器. unity 使用公用变量原因是,在U ...

  6. 拓展中国剩余定理(ex_crt)

    一般来讲,crt(中国剩余定理)比较常见,而ex_crt(拓展中国剩余定理)不是很常用 但是noi 2018偏偏考了这么个诡异的东西... 所以这里写一个ex_crt模板 模型: 求一个x满足上述方程 ...

  7. Python判断字符串是否xx开始或结尾

    判断是否xx开始 使用startswith 示例代码: String = "12345 上山打老虎" if str(String).startswith('1'): #判断Stri ...

  8. linux学习笔记之 basename, dirname

    前言: basename: 用于打印目录或者文件的基本名称 dirname: 去除文件名中的非目录部分,仅显示与目录有关的内容.dirname命令读取指定路径名保留最后一个/及其后面的字符,删除其他部 ...

  9. 数据库解析IP,时间戳

    #解析IP SELECT INET_NTOA('168494269'); #解析时间戳 SELECT FROM_UNIXTIME('1505458308');

  10. AI-解析器-request.data内部如何按照自定义解析格式-解析数据

    QUESTION:post方法中调用request.data方法时,当在Courseview类中添加parser_classes=[ForParser,],就可以将数据解析成parser_classe ...