当前位置:   article > 正文

开源!自制一个桌面宠物(STM32CUBEMX HAL库 PWM波 小项目)_stm32开源项目

stm32开源项目
原视频:好,自制一个桌面宠物!_哔哩哔哩_bilibili
基础所需基础电路认识,C语言,STM32开发,STM32CUBEIDE或CUBEMX和Keil使用(重要),一点点艺术细胞、一点点耐心。
CAUTION:本文重点在代码部分的开源,是基于HAL库。硬件手工部分不出教程(没必要)可以直接看视频P2,文末附步态参考出处,接线图,舵机安排。

硬件配置

主控:STM32F103C8T6 粉色沉金板

舵机:SG90 *4

屏幕:1.3寸OLED (IIC驱动)

供电:锂电池 (3.7V 30mm*40mm 800mah) + 锂电池充放电模块(不会自动断电,适配3.7V锂电池,充放电同口)

蓝牙:低功耗蓝牙(BLE,串口透传,便宜又好用)

软件配置

手机app开发:appinventor制作(这里不附教程,因为我也不熟,唯一有用的建议是我的蓝牙模组要用BLE而不是普通蓝牙,需另外下载并配置,建议另寻他佬教程,需要app的可B站私信

单片机开发:

平台:STM32CUBEIDE(等效STM32CUBEMX+Keil)

软件开源:  

提纲

1.定时器pwm波输出

2.串口信息交互

3.OLED显示  

CUBEMX配置:

(这里没有配置驱动屏幕的IIC,选择直接软件模拟,文末会附驱动代码。

1.RCC时钟配置:

(无脑选择外部时钟,无脑拉最高频。

2.定时器配置PWM输出模式:

(一个定时器直接开四个PWM通道即可,并关注输出引脚是否正确。根据舵机参数,配置PWM频率为50Hz。通道一为前右脚,通道二为后右脚,通道三为前左脚,通道四为后左脚,脚的位置和角度见文末图,是参考文末大佬的视频的

考虑到单片机引脚位置,可以把通道2、3复用到A3A4,方便接线。 

 

3.配置串口

(也很无脑,但要根据蓝牙模块的参数配置传输速率(Baud Rate),我是115200。

并且开中断NVIC,优先级按经验来填2就可。

4.IIC引脚配置(软件模拟IIC,引脚任意两个IO就可以,要命名成这个是因为和驱动代码匹配)

小Tip:

经验所得,把系统滴答时钟的优先级拉最高可以防止卡死在HAL_Delay里面。

5.最后生成工程,用keil的这里改成MDK_ARM

推荐打勾这个,为每个外设建.c和.h文件,使工程结构更清晰。

最后直接ctrl+s即可生成工程(用STM32CUBEMX+Keil的点Generate code建立工程)

代码部分:(最后会附完整代码,其中LED的控制可有可无。

1.PWM波输出(姿态
  1. uint16_t angle(uint8_t angle) //角度CCR值转换
  2. {
  3. return angle*2000/180+500;
  4. }
  5. void Rbt_Init(void) //立正
  6. {
  7. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  8. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  9. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  10. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  11. HAL_Delay(100);
  12. }
  13. void move_forward(void) //前进
  14. {
  15. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(135));
  16. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(45));
  17. HAL_Delay(move_delay);
  18. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(45));
  19. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(135));
  20. HAL_Delay(move_delay);
  21. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  22. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  23. HAL_Delay(move_delay);
  24. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  25. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  26. HAL_Delay(move_delay);
  27. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(135));
  28. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(45));
  29. HAL_Delay(move_delay);
  30. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(45));
  31. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(135));
  32. HAL_Delay(move_delay);
  33. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  34. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  35. HAL_Delay(move_delay);
  36. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  37. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  38. HAL_Delay(move_delay);
  39. }
  40. void move_behind(void) //后退
  41. {
  42. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(45));
  43. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(135));
  44. HAL_Delay(move_delay);
  45. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(135));
  46. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(45));
  47. HAL_Delay(move_delay);
  48. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  49. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  50. HAL_Delay(move_delay);
  51. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  52. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  53. HAL_Delay(move_delay);
  54. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(45));
  55. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(135));
  56. HAL_Delay(move_delay);
  57. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(135));
  58. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(45));
  59. HAL_Delay(move_delay);
  60. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  61. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  62. HAL_Delay(move_delay);
  63. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  64. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  65. HAL_Delay(move_delay);
  66. }
  67. void move_right(void) //右转
  68. {
  69. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(45));
  70. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(45));
  71. HAL_Delay(move_delay);
  72. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(135));
  73. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(135));
  74. HAL_Delay(move_delay);
  75. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  76. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  77. HAL_Delay(move_delay);
  78. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  79. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  80. HAL_Delay(move_delay);
  81. }
  82. void move_left(void) //左转
  83. {
  84. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(135));
  85. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(135));
  86. HAL_Delay(move_delay);
  87. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(45));
  88. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(45));
  89. HAL_Delay(move_delay);
  90. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  91. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  92. HAL_Delay(move_delay);
  93. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  94. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  95. HAL_Delay(move_delay);
  96. }
  97. void move_swing(void) //摇摆
  98. {
  99. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(130));
  100. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(130));
  101. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(50));
  102. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(50));
  103. HAL_Delay(250);
  104. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(50));
  105. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(50));
  106. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(130));
  107. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(130));
  108. HAL_Delay(250);
  109. }
  110. void move_stretch(void){ //伸懒腰+坐下招手
  111. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  112. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  113. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  114. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  115. if(TIM2->CCR1<angle(155) && TIM2->CCR3>angle(25)){
  116. for(uint8_t i=0;i<70;i++){ //循环算法,可以减慢舵机运转速度
  117. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90+i));
  118. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90-i));
  119. HAL_Delay(move_speed);
  120. }
  121. HAL_Delay(1000);
  122. for(uint8_t i=0;i<70;i++){
  123. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(160-i));
  124. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(20+i));
  125. HAL_Delay(move_speed);
  126. }
  127. for(uint8_t i=0;i<65;i++){
  128. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90+i));
  129. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90-i));
  130. HAL_Delay(move_speed);
  131. }
  132. for(uint8_t i=0;i<20;i++){
  133. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90-i));
  134. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90+i));
  135. HAL_Delay(move_speed);
  136. }
  137. HAL_Delay(1000);
  138. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(140));
  139. HAL_Delay(1000);
  140. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(178));
  141. HAL_Delay(500);
  142. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(140));
  143. HAL_Delay(500);
  144. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(178));
  145. HAL_Delay(500);
  146. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(140));
  147. HAL_Delay(500);
  148. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(70));
  149. }
  150. }
  151. void move_sleep(void){ //睡眠
  152. if(TIM2->CCR3<angle(160) && TIM2->CCR1>angle(20)){
  153. for(uint8_t i=0;i<75;i++){
  154. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90-i));
  155. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90+i));
  156. HAL_Delay(move_speed);
  157. }
  158. }
  159. if(TIM2->CCR2<angle(160) && TIM2->CCR4>angle(20)){
  160. for(uint8_t i=0;i<75;i++){
  161. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90+i));
  162. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90-i));
  163. HAL_Delay(move_speed);
  164. }
  165. }
  166. }
2. 串口接收

(采用中断

while前开一下

HAL_UART_Receive_IT(&huart1, &move_mode, 1);

 中断回调函数(用来切换表情,然后再开启中断接收(不然后面会接收不到)

  1. void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
  2. {
  3. //重新设置中断
  4. if(move_mode == 8){
  5. OLED_Clear();
  6. OLED_DrawBMP(0,0,128,8,BMP2);//前进脸
  7. }
  8. else if(move_mode == 2){
  9. OLED_Clear();
  10. OLED_DrawBMP(0,0,128,8,BMP2);//后退脸
  11. }
  12. else if(move_mode == 4){
  13. OLED_Clear();
  14. OLED_DrawBMP(0,0,128,8,BMP4);//左转脸
  15. }
  16. else if(move_mode == 6){
  17. OLED_Clear();
  18. OLED_DrawBMP(0,0,128,8,BMP3);//右转脸
  19. }
  20. else if(move_mode == 'A'){
  21. OLED_Clear();
  22. OLED_DrawBMP(0,0,128,8,BMP2);//摇摆脸
  23. }
  24. HAL_UART_Receive_IT(&huart1, &move_mode, 1); //再次开启中断接收
  25. }
 3.主函数内while循环(运行当前动作
  1. while (1)
  2. {
  3. if(move_mode == 8){//前进
  4. move_forward();
  5. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  6. flag=0;
  7. }
  8. else if(move_mode == 2){//后退
  9. move_behind();
  10. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  11. flag=0;
  12. }
  13. else if(move_mode == 4){//左转
  14. move_left();
  15. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  16. flag=0;
  17. }
  18. else if(move_mode == 6){//右转
  19. move_right();
  20. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  21. flag=0;
  22. }
  23. else if(move_mode == 5 || move_mode == 'C'){//立正
  24. OLED_DrawBMP(0,0,128,8,BMP1);
  25. Rbt_Init();
  26. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  27. flag=0;
  28. }
  29. else if(move_mode == 'A'){//摇摆
  30. move_swing();
  31. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  32. flag=0;
  33. }
  34. else if(move_mode == 'B'){//坐下
  35. if(flag==0){
  36. OLED_DrawBMP(0,0,128,8,BMP2);
  37. move_stretch();
  38. OLED_DrawBMP(0,0,128,8,BMP5);
  39. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  40. flag=1;
  41. }
  42. }
  43. else if(move_mode == 'D'){//睡觉
  44. if(flag==0){
  45. move_sleep();
  46. OLED_DrawBMP(0,0,128,8,BMP6);
  47. flag=1;
  48. }
  49. }
  50. /* USER CODE END WHILE */
  51. /* USER CODE BEGIN 3 */
  52. }

main文件全部代码:

  1. /* USER CODE END Header */
  2. /* Includes ------------------------------------------------------------------*/
  3. #include "main.h"
  4. #include "tim.h"
  5. #include "usart.h"
  6. #include "gpio.h"
  7. /* Private includes ----------------------------------------------------------*/
  8. /* USER CODE BEGIN Includes */
  9. #include <stdio.h>
  10. #include "oled.h"
  11. #include "bmp.h"
  12. /* USER CODE END Includes */
  13. /* Private typedef -----------------------------------------------------------*/
  14. /* USER CODE BEGIN PTD */
  15. /* USER CODE END PTD */
  16. /* Private define ------------------------------------------------------------*/
  17. /* USER CODE BEGIN PD */
  18. /* USER CODE END PD */
  19. /* Private macro -------------------------------------------------------------*/
  20. /* USER CODE BEGIN PM */
  21. /* USER CODE END PM */
  22. /* Private variables ---------------------------------------------------------*/
  23. /* USER CODE BEGIN PV */
  24. uint8_t move_mode = 0;
  25. uint8_t flag = 0;
  26. #define move_delay 150 //一般动作调速
  27. #define move_speed 4 //慢速动作调速
  28. /* USER CODE END PV */
  29. /* Private function prototypes -----------------------------------------------*/
  30. void SystemClock_Config(void);
  31. /* USER CODE BEGIN PFP */
  32. void Rbt_Init(void);
  33. uint16_t angle(uint8_t angle);
  34. void move_forward(void);
  35. void move_behind(void);
  36. void move_right(void);
  37. void move_left(void);
  38. void move_swing(void);
  39. void move_stretch(void);
  40. void move_test(void);
  41. void move_sleep(void);
  42. /* USER CODE END PFP */
  43. /* Private user code ---------------------------------------------------------*/
  44. /* USER CODE BEGIN 0 */
  45. void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
  46. {
  47. //重新设置中断
  48. if(move_mode == 8){
  49. OLED_Clear();
  50. OLED_DrawBMP(0,0,128,8,BMP2);//前进脸
  51. }
  52. else if(move_mode == 2){
  53. OLED_Clear();
  54. OLED_DrawBMP(0,0,128,8,BMP2);//后退脸
  55. }
  56. else if(move_mode == 4){
  57. OLED_Clear();
  58. OLED_DrawBMP(0,0,128,8,BMP4);//左转脸
  59. }
  60. else if(move_mode == 6){
  61. OLED_Clear();
  62. OLED_DrawBMP(0,0,128,8,BMP3);//右转脸
  63. }
  64. else if(move_mode == 'A'){
  65. OLED_Clear();
  66. OLED_DrawBMP(0,0,128,8,BMP2);//摇摆脸
  67. }
  68. HAL_UART_Receive_IT(&huart1, &move_mode, 1);
  69. }
  70. /* USER CODE END 0 */
  71. /**
  72. * @brief The application entry point.
  73. * @retval int
  74. */
  75. int main(void)
  76. {
  77. /* USER CODE BEGIN 1 */
  78. /* USER CODE END 1 */
  79. /* MCU Configuration--------------------------------------------------------*/
  80. /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  81. HAL_Init();
  82. /* USER CODE BEGIN Init */
  83. /* USER CODE END Init */
  84. /* Configure the system clock */
  85. SystemClock_Config();
  86. /* USER CODE BEGIN SysInit */
  87. /* USER CODE END SysInit */
  88. /* Initialize all configured peripherals */
  89. MX_GPIO_Init();
  90. MX_USART1_UART_Init();
  91. MX_TIM2_Init();
  92. /* USER CODE BEGIN 2 */
  93. /* USER CODE END 2 */
  94. /* Infinite loop */
  95. /* USER CODE BEGIN WHILE */
  96. HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_1);//开启PWM输出
  97. HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_2);
  98. HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_3);
  99. HAL_TIM_PWM_Start(&htim2, TIM_CHANNEL_4);
  100. HAL_UART_Receive_IT(&huart1, &move_mode, 1);//开启中断接收
  101. OLED_Init();//屏幕初始化
  102. OLED_Clear();
  103. OLED_DrawBMP(0,0,128,8,BMP6);//立正脸
  104. while (1)
  105. {
  106. /*__HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(120));
  107. HAL_Delay(1);*/
  108. if(move_mode == 8){//前进
  109. move_forward();
  110. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  111. flag=0;
  112. }
  113. else if(move_mode == 2){//后退
  114. move_behind();
  115. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  116. flag=0;
  117. }
  118. else if(move_mode == 4){//左转
  119. move_left();
  120. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  121. flag=0;
  122. }
  123. else if(move_mode == 6){//右转
  124. move_right();
  125. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  126. flag=0;
  127. }
  128. else if(move_mode == 5 || move_mode == 'C'){//立正
  129. OLED_DrawBMP(0,0,128,8,BMP1);
  130. Rbt_Init();
  131. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  132. flag=0;
  133. }
  134. else if(move_mode == 'A'){//摇摆
  135. move_swing();
  136. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  137. flag=0;
  138. }
  139. else if(move_mode == 'B'){//坐下
  140. if(flag==0){
  141. OLED_DrawBMP(0,0,128,8,BMP2);
  142. move_stretch();
  143. OLED_DrawBMP(0,0,128,8,BMP5);
  144. HAL_GPIO_TogglePin(LED0_GPIO_Port, LED0_Pin);
  145. flag=1;
  146. }
  147. }
  148. else if(move_mode == 'D'){//睡觉
  149. if(flag==0){
  150. move_sleep();
  151. OLED_DrawBMP(0,0,128,8,BMP6);
  152. flag=1;
  153. }
  154. }
  155. /* USER CODE END WHILE */
  156. /* USER CODE BEGIN 3 */
  157. }
  158. /* USER CODE END 3 */
  159. }
  160. /**
  161. * @brief System Clock Configuration
  162. * @retval None
  163. */
  164. void SystemClock_Config(void)
  165. {
  166. RCC_OscInitTypeDef RCC_OscInitStruct = {0};
  167. RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
  168. /** Initializes the RCC Oscillators according to the specified parameters
  169. * in the RCC_OscInitTypeDef structure.
  170. */
  171. RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
  172. RCC_OscInitStruct.HSEState = RCC_HSE_ON;
  173. RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1;
  174. RCC_OscInitStruct.HSIState = RCC_HSI_ON;
  175. RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
  176. RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
  177. RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9;
  178. if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
  179. {
  180. Error_Handler();
  181. }
  182. /** Initializes the CPU, AHB and APB buses clocks
  183. */
  184. RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
  185. |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
  186. RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
  187. RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
  188. RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
  189. RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
  190. if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)
  191. {
  192. Error_Handler();
  193. }
  194. }
  195. /* USER CODE BEGIN 4 */
  196. void Rbt_Init(void)
  197. {
  198. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  199. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  200. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  201. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  202. HAL_Delay(100);
  203. }
  204. uint16_t angle(uint8_t angle)
  205. {
  206. return angle*2000/180+500;
  207. }
  208. void move_forward(void)
  209. {
  210. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(135));
  211. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(45));
  212. HAL_Delay(move_delay);
  213. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(45));
  214. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(135));
  215. HAL_Delay(move_delay);
  216. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  217. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  218. HAL_Delay(move_delay);
  219. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  220. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  221. HAL_Delay(move_delay);
  222. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(135));
  223. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(45));
  224. HAL_Delay(move_delay);
  225. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(45));
  226. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(135));
  227. HAL_Delay(move_delay);
  228. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  229. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  230. HAL_Delay(move_delay);
  231. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  232. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  233. HAL_Delay(move_delay);
  234. }
  235. void move_behind(void)
  236. {
  237. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(45));
  238. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(135));
  239. HAL_Delay(move_delay);
  240. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(135));
  241. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(45));
  242. HAL_Delay(move_delay);
  243. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  244. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  245. HAL_Delay(move_delay);
  246. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  247. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  248. HAL_Delay(move_delay);
  249. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(45));
  250. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(135));
  251. HAL_Delay(move_delay);
  252. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(135));
  253. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(45));
  254. HAL_Delay(move_delay);
  255. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  256. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  257. HAL_Delay(move_delay);
  258. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  259. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  260. HAL_Delay(move_delay);
  261. }
  262. void move_right(void)
  263. {
  264. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(45));
  265. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(45));
  266. HAL_Delay(move_delay);
  267. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(135));
  268. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(135));
  269. HAL_Delay(move_delay);
  270. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  271. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  272. HAL_Delay(move_delay);
  273. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  274. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  275. HAL_Delay(move_delay);
  276. }
  277. void move_left(void)
  278. {
  279. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(135));
  280. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(135));
  281. HAL_Delay(move_delay);
  282. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(45));
  283. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(45));
  284. HAL_Delay(move_delay);
  285. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  286. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  287. HAL_Delay(move_delay);
  288. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  289. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  290. HAL_Delay(move_delay);
  291. }
  292. void move_swing(void)
  293. {
  294. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(130));
  295. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(130));
  296. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(50));
  297. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(50));
  298. HAL_Delay(200);
  299. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(50));
  300. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(50));
  301. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(130));
  302. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(130));
  303. HAL_Delay(200);
  304. }
  305. void move_stretch(void){
  306. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90));
  307. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90));
  308. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90));
  309. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90));
  310. if(TIM2->CCR1<angle(155) && TIM2->CCR3>angle(25)){
  311. for(uint8_t i=0;i<70;i++){
  312. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90+i));
  313. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90-i));
  314. HAL_Delay(move_speed);
  315. }
  316. HAL_Delay(1000);
  317. for(uint8_t i=0;i<70;i++){
  318. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(160-i));
  319. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(20+i));
  320. HAL_Delay(move_speed);
  321. }
  322. for(uint8_t i=0;i<65;i++){
  323. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90+i));
  324. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90-i));
  325. HAL_Delay(move_speed);
  326. }
  327. for(uint8_t i=0;i<20;i++){
  328. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90-i));
  329. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90+i));
  330. HAL_Delay(move_speed);
  331. }
  332. HAL_Delay(1000);
  333. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(140));
  334. HAL_Delay(1000);
  335. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(178));
  336. HAL_Delay(500);
  337. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(140));
  338. HAL_Delay(500);
  339. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(178));
  340. HAL_Delay(500);
  341. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(140));
  342. HAL_Delay(500);
  343. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(70));
  344. }
  345. }
  346. void move_sleep(void){
  347. if(TIM2->CCR3<angle(160) && TIM2->CCR1>angle(20)){
  348. for(uint8_t i=0;i<75;i++){
  349. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_1,angle(90-i));
  350. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_3,angle(90+i));
  351. HAL_Delay(move_speed);
  352. }
  353. }
  354. if(TIM2->CCR2<angle(160) && TIM2->CCR4>angle(20)){
  355. for(uint8_t i=0;i<75;i++){
  356. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_2,angle(90+i));
  357. __HAL_TIM_SetCompare(&htim2, TIM_CHANNEL_4,angle(90-i));
  358. HAL_Delay(move_speed);
  359. }
  360. }
  361. }
  362. /* USER CODE END 4 */
  363. /**
  364. * @brief This function is executed in case of error occurrence.
  365. * @retval None
  366. */
  367. void Error_Handler(void)
  368. {
  369. /* USER CODE BEGIN Error_Handler_Debug */
  370. /* User can add his own implementation to report the HAL error return state */
  371. __disable_irq();
  372. while (1)
  373. {
  374. }
  375. /* USER CODE END Error_Handler_Debug */
  376. }
  377. #ifdef USE_FULL_ASSERT
  378. /**
  379. * @brief Reports the name of the source file and the source line number
  380. * where the assert_param error has occurred.
  381. * @param file: pointer to the source file name
  382. * @param line: assert_param error line source number
  383. * @retval None
  384. */
  385. void assert_failed(uint8_t *file, uint32_t line)
  386. {
  387. /* USER CODE BEGIN 6 */
  388. /* User can add his own implementation to report the file name and line number,
  389. ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
  390. /* USER CODE END 6 */
  391. }
  392. #endif /* USE_FULL_ASSERT */

最后附OLED驱动(评价是不如去参考别人的 

1."oled.c"

  1. #include "oled.h"
  2. //#include "stdlib.h"
  3. #include "oledfont.h"
  4. #include "main.h"
  5. void IIC_Start()
  6. {
  7. OLED_SCLK_Set() ;
  8. OLED_SDIN_Set();
  9. OLED_SDIN_Clr();
  10. OLED_SCLK_Clr();
  11. }
  12. /**********************************************
  13. //IIC Stop
  14. **********************************************/
  15. void IIC_Stop()
  16. {
  17. OLED_SCLK_Clr();
  18. OLED_SDIN_Clr();
  19. OLED_SDIN_Set();
  20. OLED_SCLK_Set() ;
  21. }
  22. /**********************************************
  23. // IIC Write byte
  24. **********************************************/
  25. void Write_IIC_Byte(unsigned char IIC_Byte)
  26. {
  27. unsigned char i;
  28. unsigned char m,da;
  29. da=IIC_Byte;
  30. for(i=0;i<8;i++)
  31. {
  32. m=da;
  33. OLED_SCLK_Clr();
  34. m=m&0x80;
  35. if(m==0x80)
  36. {OLED_SDIN_Set();}
  37. else OLED_SDIN_Clr();
  38. da=da<<1;
  39. OLED_SCLK_Set();
  40. }
  41. OLED_SCLK_Clr();
  42. OLED_SCLK_Set() ;
  43. }
  44. /**********************************************
  45. // IIC Write Command
  46. **********************************************/
  47. void Write_IIC_Command(unsigned char IIC_Command)
  48. {
  49. IIC_Start();
  50. Write_IIC_Byte(0x78); //Slave address,SA0=0
  51. Write_IIC_Byte(0x00); //write command
  52. Write_IIC_Byte(IIC_Command);
  53. IIC_Stop();
  54. }
  55. /**********************************************
  56. // IIC Write Data
  57. **********************************************/
  58. void Write_IIC_Data(unsigned char IIC_Data)
  59. {
  60. IIC_Start();
  61. Write_IIC_Byte(0x78); //D/C#=0; R/W#=0
  62. Write_IIC_Byte(0x40); //write data
  63. Write_IIC_Byte(IIC_Data);
  64. IIC_Stop();
  65. }
  66. void OLED_WR_Byte(unsigned dat,unsigned cmd)
  67. {
  68. if(cmd)
  69. {
  70. IIC_Start();
  71. Write_IIC_Byte(0x78); //D/C#=0; R/W#=0
  72. Write_IIC_Byte(0x40); //write data
  73. Write_IIC_Byte(dat);
  74. IIC_Stop();
  75. }
  76. else {
  77. IIC_Start();
  78. Write_IIC_Byte(0x78); //Slave address,SA0=0
  79. Write_IIC_Byte(0x00); //write command
  80. Write_IIC_Byte(dat);
  81. IIC_Stop();
  82. }
  83. }
  84. /********************************************
  85. // fill_Picture
  86. ********************************************/
  87. void fill_picture(unsigned char fill_Data)
  88. {
  89. unsigned char m,n;
  90. for(m=0;m<8;m++)
  91. {
  92. OLED_WR_Byte(0xb0+m,0); //page0-page1
  93. OLED_WR_Byte(0x00,0); //low column start address
  94. OLED_WR_Byte(0x10,0); //high column start address
  95. for(n=0;n<128;n++)
  96. {
  97. OLED_WR_Byte(fill_Data,1);
  98. }
  99. }
  100. }
  101. /***********************Delay****************************************/
  102. /*void Delay_50ms(unsigned int Del_50ms)
  103. {
  104. unsigned int m;
  105. for(;Del_50ms>0;Del_50ms--)
  106. for(m=6245;m>0;m--);
  107. }
  108. void Delay_1ms(unsigned int Del_1ms)
  109. {
  110. unsigned char j;
  111. while(Del_1ms--)
  112. {
  113. for(j=0;j<123;j++);
  114. }
  115. }*/
  116. //��������
  117. void OLED_Set_Pos(unsigned char x, unsigned char y)
  118. { OLED_WR_Byte(0xb0+y,OLED_CMD);
  119. OLED_WR_Byte(((x&0xf0)>>4)|0x10,OLED_CMD);
  120. OLED_WR_Byte((x&0x0f)|0x01,OLED_CMD);
  121. }
  122. //����OLED��ʾ
  123. void OLED_Display_On(void)
  124. {
  125. OLED_WR_Byte(0X8D,OLED_CMD); //SET DCDC����
  126. OLED_WR_Byte(0X14,OLED_CMD); //DCDC ON
  127. OLED_WR_Byte(0XAF,OLED_CMD); //DISPLAY ON
  128. }
  129. //�ر�OLED��ʾ
  130. void OLED_Display_Off(void)
  131. {
  132. OLED_WR_Byte(0X8D,OLED_CMD); //SET DCDC����
  133. OLED_WR_Byte(0X10,OLED_CMD); //DCDC OFF
  134. OLED_WR_Byte(0XAE,OLED_CMD); //DISPLAY OFF
  135. }
  136. //��������,������,������Ļ�Ǻ�ɫ��!��û����һ��!!!
  137. void OLED_Clear(void)
  138. {
  139. uint8_t i,n;
  140. for(i=0;i<8;i++)
  141. {
  142. OLED_WR_Byte (0xb0+i,OLED_CMD); //����ҳ��ַ��0~7��
  143. OLED_WR_Byte (0x02,OLED_CMD); //������ʾλ�á��е͵�ַ
  144. OLED_WR_Byte (0x10,OLED_CMD); //������ʾλ�á��иߵ�ַ
  145. for(n=0;n<128;n++)OLED_WR_Byte(0,OLED_DATA);
  146. } //������ʾ
  147. }
  148. void OLED_On(void)
  149. {
  150. uint8_t i,n;
  151. for(i=0;i<8;i++)
  152. {
  153. OLED_WR_Byte (0xb0+i,OLED_CMD); //����ҳ��ַ��0~7��
  154. OLED_WR_Byte (0x02,OLED_CMD); //������ʾλ�á��е͵�ַ
  155. OLED_WR_Byte (0x10,OLED_CMD); //������ʾλ�á��иߵ�ַ
  156. for(n=0;n<128;n++)OLED_WR_Byte(1,OLED_DATA);
  157. } //������ʾ
  158. }
  159. //��ָ��λ����ʾһ���ַ�,���������ַ�
  160. //x:0~127
  161. //y:0~63
  162. //mode:0,������ʾ;1,������ʾ
  163. //size:ѡ������ 16/12
  164. void OLED_ShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t Char_Size)
  165. {
  166. unsigned char c=0,i=0;
  167. c=chr-' ';//�õ�ƫ�ƺ��ֵ
  168. if(x>Max_Column-1){x=0;y=y+2;}
  169. if(Char_Size ==16)
  170. {
  171. OLED_Set_Pos(x,y);
  172. for(i=0;i<8;i++)
  173. OLED_WR_Byte(F8X16[c*16+i],OLED_DATA);
  174. OLED_Set_Pos(x,y+1);
  175. for(i=0;i<8;i++)
  176. OLED_WR_Byte(F8X16[c*16+i+8],OLED_DATA);
  177. }
  178. else {
  179. OLED_Set_Pos(x,y);
  180. for(i=0;i<6;i++)
  181. OLED_WR_Byte(F6x8[c][i],OLED_DATA);
  182. }
  183. }
  184. //m^n����
  185. uint32_t oled_pow(uint8_t m,uint8_t n)
  186. {
  187. uint32_t result=1;
  188. while(n--)result*=m;
  189. return result;
  190. }
  191. //��ʾ2������
  192. //x,y :�������
  193. //len :���ֵ�λ��
  194. //size:�����С
  195. //mode:ģʽ 0,���ģʽ;1,����ģʽ
  196. //num:��ֵ(0~4294967295);
  197. void OLED_ShowNum(uint8_t x,uint8_t y,uint32_t num,uint8_t len,uint8_t size2)
  198. {
  199. uint8_t t,temp;
  200. uint8_t enshow=0;
  201. for(t=0;t<len;t++)
  202. {
  203. temp=(num/oled_pow(10,len-t-1))%10;
  204. if(enshow==0&&t<(len-1))
  205. {
  206. if(temp==0)
  207. {
  208. OLED_ShowChar(x+(size2/2)*t,y,' ',size2);
  209. continue;
  210. }else enshow=1;
  211. }
  212. OLED_ShowChar(x+(size2/2)*t,y,temp+'0',size2);
  213. }
  214. }
  215. //��ʾһ���ַ��Ŵ�
  216. void OLED_ShowString(uint8_t x,uint8_t y,uint8_t *chr,uint8_t Char_Size)
  217. {
  218. unsigned char j=0;
  219. while (chr[j]!='\0')
  220. { OLED_ShowChar(x,y,chr[j],Char_Size);
  221. x+=8;
  222. if(x>120){x=0;y+=2;}
  223. j++;
  224. }
  225. }
  226. //��ʾ����
  227. void OLED_ShowCHinese(uint8_t x,uint8_t y,uint8_t no)
  228. {
  229. uint8_t t,adder=0;
  230. OLED_Set_Pos(x,y);
  231. for(t=0;t<16;t++)
  232. {
  233. OLED_WR_Byte(Hzk[2*no][t],OLED_DATA);
  234. adder+=1;
  235. }
  236. OLED_Set_Pos(x,y+1);
  237. for(t=0;t<16;t++)
  238. {
  239. OLED_WR_Byte(Hzk[2*no+1][t],OLED_DATA);
  240. adder+=1;
  241. }
  242. }
  243. /***********������������ʾ��ʾBMPͼƬ128��64��ʼ������(x,y),x�ķ�Χ0��127��yΪҳ�ķ�Χ0��7*****************/
  244. void OLED_DrawBMP(unsigned char x0, unsigned char y0,unsigned char x1, unsigned char y1,unsigned char BMP[])
  245. {
  246. unsigned int j=0;
  247. unsigned char x,y;
  248. if(y1%8==0) y=y1/8;
  249. else y=y1/8+1;
  250. for(y=y0;y<y1;y++)
  251. {
  252. OLED_Set_Pos(x0,y);
  253. for(x=x0;x<x1;x++)
  254. {
  255. OLED_WR_Byte(BMP[j++],OLED_DATA);
  256. }
  257. }
  258. }
  259. //��ʼ��SSD1306
  260. void OLED_Init(void)
  261. {
  262. // GPIO_InitTypeDef GPIO_InitStructure;
  263. //
  264. // RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB|RCC_APB2Periph_GPIOD|RCC_APB2Periph_GPIOG, ENABLE); //ʹ��PC,D,G�˿�ʱ��
  265. //
  266. // GPIO_InitStructure.GPIO_Pin = GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7|GPIO_Pin_3|GPIO_Pin_8; //PD3,PD6�������
  267. // GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //�������
  268. // GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;//�ٶ�50MHz
  269. // GPIO_Init(GPIOD, &GPIO_InitStructure); //��ʼ��GPIOD3,6
  270. // GPIO_SetBits(GPIOD,GPIO_Pin_4|GPIO_Pin_5|GPIO_Pin_6|GPIO_Pin_7|GPIO_Pin_3|GPIO_Pin_8); //PD3,PD6 �����
  271. // #if OLED_MODE==1
  272. //
  273. // GPIO_InitStructure.GPIO_Pin =0xFF; //PC0~7 OUT�������
  274. // GPIO_Init(GPIOC, &GPIO_InitStructure);
  275. // GPIO_SetBits(GPIOC,0xFF); //PC0~7�����
  276. //
  277. // GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13|GPIO_Pin_14|GPIO_Pin_15; //PG13,14,15 OUT�������
  278. // GPIO_Init(GPIOG, &GPIO_InitStructure);
  279. // GPIO_SetBits(GPIOG,GPIO_Pin_13|GPIO_Pin_14|GPIO_Pin_15); //PG13,14,15 OUT �����
  280. //
  281. // #else
  282. // GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0|GPIO_Pin_1; //PC0,1 OUT�������
  283. // GPIO_Init(GPIOC, &GPIO_InitStructure);
  284. // GPIO_SetBits(GPIOC,GPIO_Pin_0|GPIO_Pin_1); //PC0,1 OUT �����
  285. //
  286. // GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15; //PG15 OUT������� RST
  287. // GPIO_Init(GPIOG, &GPIO_InitStructure);
  288. // GPIO_SetBits(GPIOG,GPIO_Pin_15); //PG15 OUT �����
  289. //
  290. //
  291. // #endif
  292. OLED_WR_Byte(0xAE,OLED_CMD);//--display off
  293. OLED_WR_Byte(0x02,OLED_CMD);//---set low column address
  294. OLED_WR_Byte(0x10,OLED_CMD);//---set high column address
  295. OLED_WR_Byte(0x40,OLED_CMD);//--set start line address
  296. OLED_WR_Byte(0xB0,OLED_CMD);//--set page address
  297. OLED_WR_Byte(0x81,OLED_CMD); // contract control
  298. OLED_WR_Byte(0xFF,OLED_CMD);//--128
  299. OLED_WR_Byte(0xA1,OLED_CMD);//set segment remap
  300. OLED_WR_Byte(0xA6,OLED_CMD);//--normal / reverse
  301. OLED_WR_Byte(0xA8,OLED_CMD);//--set multiplex ratio(1 to 64)
  302. OLED_WR_Byte(0x3F,OLED_CMD);//--1/64 duty
  303. OLED_WR_Byte(0xAD,OLED_CMD);//set charge pump enable
  304. OLED_WR_Byte(0x8B,OLED_CMD);//-0x8B �ڹ� VCC
  305. OLED_WR_Byte(0x33,OLED_CMD);//-0X30---0X33 set VPP 9V
  306. OLED_WR_Byte(0xC8,OLED_CMD);//Com scan direction
  307. OLED_WR_Byte(0xD3,OLED_CMD);//-set display offset
  308. OLED_WR_Byte(0x00,OLED_CMD);//
  309. OLED_WR_Byte(0xD5,OLED_CMD);//set osc division
  310. OLED_WR_Byte(0x80,OLED_CMD);//
  311. OLED_WR_Byte(0xD8,OLED_CMD);//set area color mode off
  312. OLED_WR_Byte(0x05,OLED_CMD);//
  313. OLED_WR_Byte(0xD9,OLED_CMD);//Set Pre-Charge Period
  314. OLED_WR_Byte(0x1F,OLED_CMD);//
  315. OLED_WR_Byte(0xDA,OLED_CMD);//set com pin configuartion
  316. OLED_WR_Byte(0x12,OLED_CMD);//
  317. OLED_WR_Byte(0xDB,OLED_CMD);//set Vcomh
  318. OLED_WR_Byte(0x40,OLED_CMD);//
  319. OLED_WR_Byte(0xAF,OLED_CMD);//--turn on oled panel
  320. }

2."oled.h"

  1. #ifndef __OLED_H
  2. #define __OLED_H
  3. #include "main.h"
  4. #include "stdlib.h"
  5. //#include "gpio.h"
  6. #define OLED_MODE 0
  7. #define SIZE 8
  8. #define XLevelL 0x00
  9. #define XLevelH 0x10
  10. #define Max_Column 128
  11. #define Max_Row 64
  12. #define Brightness 0xFF
  13. #define X_WIDTH 128
  14. #define Y_WIDTH 64
  15. //-----------------OLED IIC�˿ڶ���----------------
  16. #define OLED_SCLK_Clr() HAL_GPIO_WritePin(SCL_GPIO_Port,SCL_Pin,GPIO_PIN_RESET)//SCL IIC�ӿڵ�ʱ���ź�
  17. #define OLED_SCLK_Set() HAL_GPIO_WritePin(SCL_GPIO_Port,SCL_Pin,GPIO_PIN_SET)
  18. #define OLED_SDIN_Clr() HAL_GPIO_WritePin(SDA_GPIO_Port,SDA_Pin,GPIO_PIN_RESET)//SDA IIC�ӿڵ������ź�
  19. #define OLED_SDIN_Set() HAL_GPIO_WritePin(SDA_GPIO_Port,SDA_Pin,GPIO_PIN_SET)
  20. #define OLED_CMD 0 //���
  21. #define OLED_DATA 1 //���
  22. //OLED�����ú���
  23. void OLED_WR_Byte(unsigned dat,unsigned cmd);
  24. void OLED_Display_On(void);
  25. void OLED_Display_Off(void);
  26. void OLED_Init(void);
  27. void OLED_Clear(void);
  28. void OLED_DrawPoint(uint8_t x,uint8_t y,uint8_t t);
  29. void OLED_Fill(uint8_t x1,uint8_t y1,uint8_t x2,uint8_t y2,uint8_t dot);
  30. void OLED_ShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t Char_Size);
  31. void OLED_ShowNum(uint8_t x,uint8_t y,uint32_t num,uint8_t len,uint8_t size);
  32. void OLED_ShowString(uint8_t x,uint8_t y, uint8_t *p,uint8_t Char_Size);
  33. void OLED_Set_Pos(unsigned char x, unsigned char y);
  34. void OLED_ShowCHinese(uint8_t x,uint8_t y,uint8_t no);
  35. void OLED_DrawBMP(unsigned char x0, unsigned char y0,unsigned char x1, unsigned char y1,unsigned char BMP[]);
  36. void Delay_50ms(unsigned int Del_50ms);
  37. void Delay_1ms(unsigned int Del_1ms);
  38. void fill_picture(unsigned char fill_Data);
  39. void Picture();
  40. void IIC_Start();
  41. void IIC_Stop();
  42. void Write_IIC_Command(unsigned char IIC_Command);
  43. void Write_IIC_Data(unsigned char IIC_Data);
  44. void Write_IIC_Byte(unsigned char IIC_Byte);
  45. #endif

 3."bmp.h"(表情的模

  1. #ifndef __BMP_H
  2. #define __BMP_H
  3. unsigned char BMP1[] = //立正脸
  4. {
  5. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  6. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  7. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  8. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  9. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  10. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  11. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  12. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  13. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  14. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,
  15. 0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  16. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  17. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  18. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  19. 0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  20. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  21. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  22. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF8,0xFE,0xFF,0xFF,0xFF,0xFF,
  23. 0xFF,0xFF,0xFF,0xFE,0xF8,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  24. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  25. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  26. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF8,0xFE,0xFF,0xFF,
  27. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xF8,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  28. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  29. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  30. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  31. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  32. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  33. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  34. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,
  35. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  36. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  37. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  38. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  39. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  40. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  41. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  42. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,
  43. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  44. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  45. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  46. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,
  47. 0xFF,0xFF,0xFF,0xFF,0x3F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  48. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  49. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  50. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x3F,0xFF,0xFF,0xFF,
  51. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x3F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  52. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  53. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  54. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x03,0x03,
  55. 0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  56. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  57. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  58. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,
  59. 0x03,0x03,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  60. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  61. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  62. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  63. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  64. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  65. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  66. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  67. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  68. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\zjyhuoer\Desktop\1.bmp",0*/
  69. /* (128 X 64 )*/
  70. };
  71. unsigned char BMP2[] = //前进脸
  72. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  73. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  74. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  75. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  76. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  77. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  78. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  79. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  80. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  81. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  82. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  83. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  84. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  85. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  86. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  87. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  88. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  89. 0x00,0x00,0xFF,0xFF,0xFE,0xFE,0xFC,0xFC,0xF8,0xF8,0xF0,0xF0,0xE0,0xE0,0xC0,0xC0,
  90. 0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  91. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  92. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  93. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  94. 0x80,0x80,0xC0,0xC0,0xE0,0xE0,0xF0,0xF0,0xF8,0xF8,0xFC,0xFC,0xFE,0xFE,0xFF,0x00,
  95. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  96. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  97. 0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x03,0x03,0x07,0x07,0x0F,0x0F,0x1F,0x1F,0x1F,
  98. 0x3F,0x3F,0x7F,0x7F,0xFE,0xFE,0xFE,0xFC,0xFC,0xF8,0xF8,0xF0,0xF0,0xE0,0xE0,0xC0,
  99. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  100. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  101. 0x00,0x00,0xC0,0xC0,0xE0,0xE0,0xF0,0xF0,0xF8,0xF8,0xFC,0xFC,0xFE,0xFE,0x7F,0x7F,
  102. 0x3F,0x3F,0x3F,0x1F,0x1F,0x0F,0x0F,0x07,0x07,0x03,0x03,0x03,0x01,0x01,0x00,0x00,
  103. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  104. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  105. 0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0xC0,0xC0,0xE0,0xE0,0xF0,0xF0,0xF0,
  106. 0xF8,0xF8,0xFC,0xFC,0xFC,0xFE,0xFF,0x7F,0x7F,0x3F,0x3F,0x1F,0x1F,0x0F,0x0F,0x07,
  107. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  108. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  109. 0x00,0x00,0x0F,0x0F,0x1F,0x1F,0x3F,0x3F,0x7F,0x7F,0xFF,0xFF,0xFC,0xFC,0xFC,0xF8,
  110. 0xF8,0xF0,0xF0,0xE0,0xE0,0xE0,0xC0,0xC0,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,
  111. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  112. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  113. 0x00,0x00,0xFE,0xFE,0xFF,0x7F,0x7F,0x7F,0x3F,0x3F,0x1F,0x1F,0x0F,0x0F,0x07,0x07,
  114. 0x03,0x03,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  115. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  116. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  117. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x03,0x03,
  118. 0x03,0x07,0x07,0x0F,0x0F,0x1F,0x1F,0x3F,0x3F,0x7F,0x7F,0xFF,0xFF,0xFE,0xFE,0x00,
  119. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  120. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  121. 0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  122. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  123. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  124. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  125. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  126. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
  127. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  128. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  129. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  130. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  131. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  132. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  133. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  134. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  135. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\zjyhuoer\Desktop\2.2.bmp",0*/
  136. };
  137. unsigned char BMP3[] ={//左转脸
  138. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  139. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  140. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  141. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  142. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  143. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  144. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  145. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  146. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  147. 0x80,0x80,0xC0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  148. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  149. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  150. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  151. 0x80,0x80,0xC0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  152. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  153. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  154. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xFF,0xFF,
  155. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  156. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  157. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  158. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xFF,0xFF,
  159. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  160. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  161. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  162. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,
  163. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  164. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  165. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  166. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,
  167. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  168. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  169. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  170. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,
  171. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  172. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  173. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  174. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,
  175. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  176. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  177. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  178. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,
  179. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  180. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  181. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  182. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xFF,
  183. 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  184. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  185. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  186. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  187. 0x01,0x01,0x03,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  188. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  189. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  190. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  191. 0x01,0x01,0x03,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  192. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  193. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  194. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  195. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  196. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  197. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  198. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  199. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  200. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  201. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\zjyhuoer\Desktop\5.bmp",0*/
  202. };
  203. unsigned char BMP4[] ={//右转脸
  204. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  205. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  206. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  207. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  208. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  209. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  210. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  211. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  212. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  213. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  214. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xC0,0xC0,0x80,0x80,
  215. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  216. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  217. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  218. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xC0,0xC0,0x80,0x80,
  219. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  220. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  221. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  222. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  223. 0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  224. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  225. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  226. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  227. 0xFF,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  228. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  229. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  230. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  231. 0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  232. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  233. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  234. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  235. 0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  236. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  237. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  238. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  239. 0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  240. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  241. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  242. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  243. 0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  244. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  245. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  246. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  247. 0xFF,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  248. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  249. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  250. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
  251. 0xFF,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  252. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  253. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  254. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x03,0x01,0x01,
  255. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  256. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  257. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  258. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x03,0x01,0x01,
  259. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  260. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  261. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  262. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  263. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  264. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  265. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  266. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  267. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\zjyhuoer\Desktop\6.bmp",0*/
  268. /* (128 X 64 )*/
  269. };
  270. unsigned char BMP5[] ={//特殊脸
  271. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  272. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  273. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  274. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  275. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  276. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  277. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  278. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  279. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  280. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  281. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  282. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  283. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  284. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  285. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  286. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  287. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xF0,0xF0,
  288. 0x30,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x80,0xF0,0xF0,0xF0,0x80,0xC0,0x00,0x00,
  289. 0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,
  290. 0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0xC0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,
  291. 0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xC0,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,
  292. 0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00,
  293. 0x00,0x00,0xC0,0x80,0xF0,0xF0,0xF0,0x80,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,
  294. 0xF0,0xF0,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  295. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xFF,0xFF,0x0F,0x00,
  296. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x3F,0x3F,0x0F,0x3F,0x3F,0x11,0x01,0x00,
  297. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  298. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x0F,0x1E,0x1E,0x3C,0x3C,
  299. 0x3C,0x3C,0x1E,0x1E,0x0F,0x0F,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  300. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  301. 0x00,0x01,0x11,0x3F,0x3F,0x0F,0x3F,0x3F,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  302. 0x00,0x0F,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  303. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xF0,0x00,
  304. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  305. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  306. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  307. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  308. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  309. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  310. 0x00,0xF0,0xFF,0xFF,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  311. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x07,0x0F,0x0F,
  312. 0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  313. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  314. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  315. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  316. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  317. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,
  318. 0x0F,0x0F,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  319. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  320. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  321. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  322. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  323. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  324. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  325. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  326. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  327. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  328. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  329. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  330. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  331. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  332. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  333. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  334. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\zjyhuoer\Desktop\7.bmp",0*/
  335. /* (128 X 64 )*/
  336. };
  337. unsigned char BMP6[] ={ //睡觉脸
  338. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  339. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  340. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  341. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  342. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  343. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  344. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  345. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  346. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  347. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  348. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  349. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  350. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  351. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  352. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  353. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  354. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  355. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  356. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  357. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  358. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  359. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  360. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  361. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  362. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  363. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  364. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  365. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  366. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  367. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  368. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  369. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  370. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  371. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  372. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  373. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  374. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  375. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  376. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  377. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  378. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  379. 0x00,0x00,0x00,0x00,0x3E,0x3E,0x3C,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
  380. 0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
  381. 0x38,0x3C,0x3C,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3C,0x3C,0x3C,
  382. 0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,
  383. 0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x3C,0x3E,0x3E,0x00,0x00,
  384. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  385. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  386. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  387. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  388. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  389. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  390. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  391. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  392. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  393. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  394. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  395. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  396. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  397. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  398. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  399. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  400. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  401. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C:\Users\zjyhuoer\Desktop\9.bmp",0*/
  402. };
  403. #endif

4."oledfont.h"字模(其实和本项目无关,但还是要加,防止报错)

  1. #ifndef __OLEDFONT_H
  2. #define __OLEDFONT_H
  3. //常用ASCII表
  4. //偏移量32
  5. //ASCII字符集
  6. //偏移量32
  7. //大小:12*6
  8. /************************************6*8的点阵************************************/
  9. const unsigned char F6x8[][6] =
  10. {
  11. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,// sp
  12. 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00,// !
  13. 0x00, 0x00, 0x07, 0x00, 0x07, 0x00,// "
  14. 0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14,// #
  15. 0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12,// $
  16. 0x00, 0x62, 0x64, 0x08, 0x13, 0x23,// %
  17. 0x00, 0x36, 0x49, 0x55, 0x22, 0x50,// &
  18. 0x00, 0x00, 0x05, 0x03, 0x00, 0x00,// '
  19. 0x00, 0x00, 0x1c, 0x22, 0x41, 0x00,// (
  20. 0x00, 0x00, 0x41, 0x22, 0x1c, 0x00,// )
  21. 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14,// *
  22. 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08,// +
  23. 0x00, 0x00, 0x00, 0xA0, 0x60, 0x00,// ,
  24. 0x00, 0x08, 0x08, 0x08, 0x08, 0x08,// -
  25. 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,// .
  26. 0x00, 0x20, 0x10, 0x08, 0x04, 0x02,// /
  27. 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E,// 0
  28. 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00,// 1
  29. 0x00, 0x42, 0x61, 0x51, 0x49, 0x46,// 2
  30. 0x00, 0x21, 0x41, 0x45, 0x4B, 0x31,// 3
  31. 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10,// 4
  32. 0x00, 0x27, 0x45, 0x45, 0x45, 0x39,// 5
  33. 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30,// 6
  34. 0x00, 0x01, 0x71, 0x09, 0x05, 0x03,// 7
  35. 0x00, 0x36, 0x49, 0x49, 0x49, 0x36,// 8
  36. 0x00, 0x06, 0x49, 0x49, 0x29, 0x1E,// 9
  37. 0x00, 0x00, 0x36, 0x36, 0x00, 0x00,// :
  38. 0x00, 0x00, 0x56, 0x36, 0x00, 0x00,// ;
  39. 0x00, 0x08, 0x14, 0x22, 0x41, 0x00,// <
  40. 0x00, 0x14, 0x14, 0x14, 0x14, 0x14,// =
  41. 0x00, 0x00, 0x41, 0x22, 0x14, 0x08,// >
  42. 0x00, 0x02, 0x01, 0x51, 0x09, 0x06,// ?
  43. 0x00, 0x32, 0x49, 0x59, 0x51, 0x3E,// @
  44. 0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C,// A
  45. 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36,// B
  46. 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22,// C
  47. 0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C,// D
  48. 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41,// E
  49. 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01,// F
  50. 0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A,// G
  51. 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F,// H
  52. 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00,// I
  53. 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01,// J
  54. 0x00, 0x7F, 0x08, 0x14, 0x22, 0x41,// K
  55. 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40,// L
  56. 0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F,// M
  57. 0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F,// N
  58. 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E,// O
  59. 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06,// P
  60. 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E,// Q
  61. 0x00, 0x7F, 0x09, 0x19, 0x29, 0x46,// R
  62. 0x00, 0x46, 0x49, 0x49, 0x49, 0x31,// S
  63. 0x00, 0x01, 0x01, 0x7F, 0x01, 0x01,// T
  64. 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F,// U
  65. 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F,// V
  66. 0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F,// W
  67. 0x00, 0x63, 0x14, 0x08, 0x14, 0x63,// X
  68. 0x00, 0x07, 0x08, 0x70, 0x08, 0x07,// Y
  69. 0x00, 0x61, 0x51, 0x49, 0x45, 0x43,// Z
  70. 0x00, 0x00, 0x7F, 0x41, 0x41, 0x00,// [
  71. 0x00, 0x55, 0x2A, 0x55, 0x2A, 0x55,// 55
  72. 0x00, 0x00, 0x41, 0x41, 0x7F, 0x00,// ]
  73. 0x00, 0x04, 0x02, 0x01, 0x02, 0x04,// ^
  74. 0x00, 0x40, 0x40, 0x40, 0x40, 0x40,// _
  75. 0x00, 0x00, 0x01, 0x02, 0x04, 0x00,// '
  76. 0x00, 0x20, 0x54, 0x54, 0x54, 0x78,// a
  77. 0x00, 0x7F, 0x48, 0x44, 0x44, 0x38,// b
  78. 0x00, 0x38, 0x44, 0x44, 0x44, 0x20,// c
  79. 0x00, 0x38, 0x44, 0x44, 0x48, 0x7F,// d
  80. 0x00, 0x38, 0x54, 0x54, 0x54, 0x18,// e
  81. 0x00, 0x08, 0x7E, 0x09, 0x01, 0x02,// f
  82. 0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C,// g
  83. 0x00, 0x7F, 0x08, 0x04, 0x04, 0x78,// h
  84. 0x00, 0x00, 0x44, 0x7D, 0x40, 0x00,// i
  85. 0x00, 0x40, 0x80, 0x84, 0x7D, 0x00,// j
  86. 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00,// k
  87. 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00,// l
  88. 0x00, 0x7C, 0x04, 0x18, 0x04, 0x78,// m
  89. 0x00, 0x7C, 0x08, 0x04, 0x04, 0x78,// n
  90. 0x00, 0x38, 0x44, 0x44, 0x44, 0x38,// o
  91. 0x00, 0xFC, 0x24, 0x24, 0x24, 0x18,// p
  92. 0x00, 0x18, 0x24, 0x24, 0x18, 0xFC,// q
  93. 0x00, 0x7C, 0x08, 0x04, 0x04, 0x08,// r
  94. 0x00, 0x48, 0x54, 0x54, 0x54, 0x20,// s
  95. 0x00, 0x04, 0x3F, 0x44, 0x40, 0x20,// t
  96. 0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C,// u
  97. 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C,// v
  98. 0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C,// w
  99. 0x00, 0x44, 0x28, 0x10, 0x28, 0x44,// x
  100. 0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C,// y
  101. 0x00, 0x44, 0x64, 0x54, 0x4C, 0x44,// z
  102. 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,// horiz lines
  103. };
  104. /****************************************8*16的点阵************************************/
  105. const unsigned char F8X16[]=
  106. {
  107. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// 0
  108. 0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,//! 1
  109. 0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//" 2
  110. 0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,//# 3
  111. 0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,//$ 4
  112. 0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,//% 5
  113. 0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,//& 6
  114. 0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 7
  115. 0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,//( 8
  116. 0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,//) 9
  117. 0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,//* 10
  118. 0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,//+ 11
  119. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,//, 12
  120. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//- 13
  121. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,//. 14
  122. 0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,/// 15
  123. 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//0 16
  124. 0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//1 17
  125. 0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//2 18
  126. 0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,//3 19
  127. 0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,//4 20
  128. 0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,//5 21
  129. 0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,//6 22
  130. 0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,//7 23
  131. 0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//8 24
  132. 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,//9 25
  133. 0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,//: 26
  134. 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,//; 27
  135. 0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,//< 28
  136. 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,//= 29
  137. 0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,//> 30
  138. 0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,//? 31
  139. 0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,//@ 32
  140. 0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,//A 33
  141. 0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//B 34
  142. 0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//C 35
  143. 0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//D 36
  144. 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//E 37
  145. 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//F 38
  146. 0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//G 39
  147. 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//H 40
  148. 0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//I 41
  149. 0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//J 42
  150. 0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//K 43
  151. 0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//L 44
  152. 0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,//M 45
  153. 0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//N 46
  154. 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//O 47
  155. 0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//P 48
  156. 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,//Q 49
  157. 0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//R 50
  158. 0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//S 51
  159. 0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//T 52
  160. 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//U 53
  161. 0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//V 54
  162. 0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,//W 55
  163. 0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//X 56
  164. 0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//Y 57
  165. 0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//Z 58
  166. 0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,//[ 59
  167. 0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,//\ 60
  168. 0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,//] 61
  169. 0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^ 62
  170. 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,//_ 63
  171. 0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//` 64
  172. 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,//a 65
  173. 0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//b 66
  174. 0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//c 67
  175. 0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,//d 68
  176. 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e 69
  177. 0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//f 70
  178. 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//g 71
  179. 0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//h 72
  180. 0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//i 73
  181. 0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//j 74
  182. 0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,//k 75
  183. 0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//l 76
  184. 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m 77
  185. 0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//n 78
  186. 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//o 79
  187. 0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,//p 80
  188. 0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,//q 81
  189. 0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//r 82
  190. 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//s 83
  191. 0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,//t 84
  192. 0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//u 85
  193. 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,//v 86
  194. 0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,//w 87
  195. 0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,//x 88
  196. 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,//y 89
  197. 0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//z 90
  198. 0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,//{ 91
  199. 0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,//| 92
  200. 0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,//} 93
  201. 0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94
  202. };
  203. char Hzk[][32]={
  204. {0x00,0x00,0x20,0x20,0xE0,0x20,0x10,0x40,0x40,0xC0,0x7C,0x40,0x20,0xE0,0x00,0x00},
  205. {0x00,0x04,0x04,0x04,0x03,0x22,0x12,0x09,0x04,0x03,0x30,0x30,0x1E,0x01,0x00,0x00},/*"功",0*/
  206. /* (16 X 16 , 楷体 )*/
  207. {0x00,0x00,0x00,0x30,0xE8,0x44,0xC0,0x40,0xF0,0x5E,0xCA,0x28,0xA0,0x60,0x00,0x00},
  208. {0x00,0x04,0x02,0x7F,0x00,0x20,0x18,0x11,0x25,0x4D,0x4A,0x43,0x54,0x64,0x0C,0x00},/*"德",1*/
  209. /* (16 X 16 , 楷体 )*/
  210. };
  211. #endif

 尾巴:

接线图:

小机器狗的运动步态我也是参考b站大佬的作品(原视频:【步态详解】人人都可制作的WiFi遥控迷你四足机器人_哔哩哔哩_bilibili

他做得比我好,且也开源>-< 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/132343
推荐阅读
相关标签
  

闽ICP备14008679号