Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Arduino 得到一个;“节类型冲突”;使用M2tklib和glcd_Arduino_Conflict_Lcd - Fatal编程技术网

Arduino 得到一个;“节类型冲突”;使用M2tklib和glcd

Arduino 得到一个;“节类型冲突”;使用M2tklib和glcd,arduino,conflict,lcd,Arduino,Conflict,Lcd,我需要一些帮助来解决我正在编写的arduino程序中的“节类型冲突”。我有一个生成错误的简短示例代码: #include <glcd.h> #include "M2tk.h" #include "utility/m2ghglcd.h" #include "bitmaps/allBitmaps.h" // Definitions of Main Menu M2_LABEL(el_label_MainMenu,NULL,"Main Menu"); // Construct

我需要一些帮助来解决我正在编写的arduino程序中的“节类型冲突”。我有一个生成错误的简短示例代码:

#include <glcd.h>
#include "M2tk.h"
#include "utility/m2ghglcd.h"
#include "bitmaps/allBitmaps.h"   

// Definitions of Main Menu
  M2_LABEL(el_label_MainMenu,NULL,"Main Menu");
  // Construct Main Menu List
  M2_LIST(list_main_menu) = {&el_label_MainMenu};
  M2_VLIST(el_list_main_menu,NULL,list_main_menu);
  M2_ALIGN(el_main_menu, "W64H64", &el_list_main_menu);

M2tk m2(&el_main_menu, m2_es_arduino, m2_eh_4bd, m2_gh_glcd_ffs);

void setup() {
  GLCD.Init();   // initialise the library
  GLCD.DrawBitmap(ArduinoIcon64x32, 32,0); //draw the bitmap at the given x,y position
  delay(3000);
  GLCD.ClearScreen();
}
void loop() {  
  m2.checkKey(); 
  m2.draw();
}
#包括
#包括“M2tk.h”
#包括“公用设施/m2ghglcd.h”
#包括“位图/allBitmaps.h”
//主菜单的定义
M2_标签(el_标签_主菜单,空,“主菜单”);
//构造主菜单列表
M2_LIST(LIST_main_menu)={&el_label_main menu};
M2菜单(el列表主菜单,空,列表主菜单);
M2对齐(el主菜单、“W64H64”和el列表主菜单);
M2tk m2(和el_主菜单、m2_es_arduino、m2_eh_4bd、m2_gh_glcd_ffs);
无效设置(){
GLCD.Init();//初始化库
GLCD.DrawBitmap(ArduinoIcon64x32,32,0);//在给定的x,y位置绘制位图
延迟(3000);
GLCD.ClearScreen();
}
void loop(){
m2.checkKey();
m2.绘制();
}
我正在尝试为我的菜单驱动程序创建一个启动屏幕。我觉得这和arduino图标图像的PROGMEM定义有关。它们被定义为标准GLCD库的一部分。我真的不确定什么地方出了问题,也不知道如何解决

确切的错误消息是:

C:\Users\Dirk\Documents\Arduino\libraries\glcd/bitmap/ArduinoIcon64x32.h:25:错误:ArduinoIcon64x32导致节类型冲突

它不喜欢ArduinoIcon64x32的定义。以下是图像文件的定义方式:

#ifndef _ArduinoIcon64x32_H 
#define _ArduinoIcon64x32_H 

#include <inttypes.h>
#include <avr/pgmspace.h>

static unsigned char ArduinoIcon64x32[] PROGMEM ={
64, // bitmap width  (arduino glcdlib format)
32, // bitmap height (arduino glcdlib format)
0x00, 0x00, 0xc0, 0x20, 0x10, 0x08, 0xc8, 0x88, 0x08, 0x08, 0x10, 0x20, 0xc0, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x40, 
0x70, 0x0c, 0x30, 0xc0, 0x00, 0xc0, 0x30, 0x0c, 0x30, 0xc0, 0x00, 0xc0, 0x30, 0x08, 0x88, 0x48, 
0x28, 0x28, 0xf8, 0x20, 0x20, 0x40, 0x80, 0x40, 0x20, 0x10, 0x20, 0x98, 0x18, 0xc0, 0xc0, 0x00, 

0x00, 0x07, 0x18, 0x20, 0x40, 0x80, 0x9f, 0x8f, 0x87, 0x82, 0x40, 0x20, 0x18, 0x07, 0x00, 0x00, 
0x00, 0x00, 0x80, 0xf0, 0xfe, 0xff, 0xff, 0x1f, 0x03, 0x1f, 0xff, 0xff, 0xfc, 0xf0, 0x80, 0x00, 
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1c, 0x63, 0x80, 0x46, 
0x4a, 0x52, 0xe3, 0x52, 0x4a, 0x46, 0x80, 0x63, 0x1c, 0x02, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 

0x00, 0xc0, 0x30, 0x08, 0x04, 0xe2, 0x22, 0x22, 0x22, 0xe2, 0x04, 0x08, 0x30, 0xc0, 0x00, 0x00, 
0xe0, 0xfc, 0xff, 0xff, 0x7f, 0x7f, 0x78, 0x78, 0x78, 0x78, 0x78, 0x7f, 0x7f, 0xff, 0xff, 0xfc, 
0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
0x02, 0x02, 0xff, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

0x00, 0x01, 0x06, 0x08, 0x10, 0x23, 0x22, 0x22, 0x22, 0x23, 0x10, 0x08, 0x06, 0x01, 0x18, 0x3f, 
0x3f, 0x3f, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x3f, 
0x3f, 0x3f, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
0x0a, 0x0a, 0x2b, 0x0a, 0x0a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 

};
#endif  //define _ArduinoIcon64x32_H 
\ifndef\u ArduinoIcon64x32\u H
#定义\u ArduinoIcon64x32\u H
#包括
#包括
静态无符号字符ArduinoIcon64x32[]PROGMEM={
64,//位图宽度(arduino glcdlib格式)
32,//位图高度(arduino glcdlib格式)
0x00,0x00,0xc0,0x20,0x10,0x08,0xc8,0x88,0x08,0x08,0x10,0x20,0xc0,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xc0,0xf0,0xf8,0xf8,0xf8,0xf0,0xc0,0x00,0x00,0x00,0x40,
0x70、0x0c、0x30、0xc0、0x00、0xc0、0x30、0x0c、0x30、0xc0、0x00、0xc0、0x30、0x08、0x88、0x48,
0x28,0x28,0xf8,0x20,0x20,0x40,0x80,0x40,0x20,0x10,0x20,0x98,0x18,0xc0,0xc0,0x00,
0x00、0x07、0x18、0x20、0x40、0x80、0x9f、0x8f、0x87、0x82、0x40、0x20、0x18、0x07、0x00、0x00、,
0x00,0x00,0x80,0xf0,0xfe,0xff,0xff,0x1f,0x03,0x1f,0xff,0xff,0xfc,0xf0,0x80,0x00,
0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x1c,0x63,0x80,0x46,
0x4a、0x52、0xe3、0x52、0x4a、0x46、0x80、0x63、0x1c、0x02、0x01、0x00、0x01、0x00、0x00、,
0x00,0xc0,0x30,0x08,0x04,0xe2,0x22,0x22,0xe2,0x04,0x08,0x30,0xc0,0x00,0x00,
0xe0、0xfc、0xff、0xff、0x7f、0x7f、0x78、0x78、0x78、0x78、0x7f、0x7f、0xff、0xff、0xfc、,
0xe0、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x01,
0x02,0x02,0xff,0x02,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00、0x01、0x06、0x08、0x10、0x23、0x22、0x22、0x23、0x10、0x08、0x06、0x01、0x18、0x3f,
0x3f,0x3f,0x0f,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x0f,0x3f,
0x3f、0x3f、0x18、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x00、0x02,
0x0a,0x0a,0x2b,0x0a,0x0a,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
#endif//define\u ArduinoIcon64x32\u H

如果您能提供任何提示和帮助,或提供生成初始屏幕的替代方法,我们将不胜感激。

如果这仍然是您的问题,请您分享
PROGMEM
的定义?原因可能是由于变量类型与使用相同的
PROGMEM
属性声明的其他变量之间存在冲突,而变量类型可能是初始化方式隐含的。