NodeMCU(ESP8266) 驱动2.2寸TFT显示屏的问题
手里有一块2.2寸的ILI9225驱动TFT显示屏,用arduino NANO 安装库UTFT.h 驱动后,在arduino IDE中编译后,显示完全没有问题。考虑到wifi上网,使用NodeMCU,用arduino IDE开发,加载utft.h库后,编译就失败,问这是怎么回事,该怎么处理?有人用nodemcu在arduino IDE上驱动tft成功的案例了吗?
错误提示:
In file included from F:\DIY\arduino\Program\NodeMCU_TTF-TEST\NodeMCU_TTF-TEST.ino:27:0:
D:\Program Files\arduino-1.6.7_ESP8266_SDK_1.5.1\arduino-1.6.7\portable\sketchbook\libraries\UTFT/UTFT.h:201:49: error: 'bitmapdatatype' has not been declared
void drawBitmap(int x, int y, int sx, int sy, bitmapdatatype data, int scale=1);
^
D:\Program Files\arduino-1.6.7_ESP8266_SDK_1.5.1\arduino-1.6.7\portable\sketchbook\libraries\UTFT/UTFT.h:202:49: error: 'bitmapdatatype' has not been declared
void drawBitmap(int x, int y, int sx, int sy, bitmapdatatype data, int deg, int rox, int roy);
^
D:\Program Files\arduino-1.6.7_ESP8266_SDK_1.5.1\arduino-1.6.7\portable\sketchbook\libraries\UTFT/UTFT.h:221:3: error: 'regtype' does not name a type
regtype *P_RS, *P_WR, *P_CS, *P_RST, *P_SDA, *P_SCL, *P_ALE, *P_LED;
^
D:\Program Files\arduino-1.6.7_ESP8266_SDK_1.5.1\arduino-1.6.7\portable\sketchbook\libraries\UTFT/UTFT.h:222:3: error: 'regsize' does not name a type
regsize B_RS, B_WR, B_CS, B_RST, B_SDA, B_SCL, B_ALE, B_LED;
^
exit status 1
编译有误。
库是一个库,为什么会出现类型不正确或者没被声明?
求助高手。
有时候,一个库,也不是就自己一个人干完一件事的,它也会有外部依赖。显然,变量类型bitmapdatatype就是它一个外部依赖,找不到了。
你对照NANO的工程找一下,这个类型定义在什么地方,肯定在这个库的外部,或者就是你的库复制的时候丢了什么。一层层分析下去,就会有眉目。 maidoo 发表于 2017-1-22 17:57
有时候,一个库,也不是就自己一个人干完一件事的,它也会有外部依赖。显然,变量类型bitmapdatatype就是它 ...
刚从新在nano上run了一下,也起不来了。 折腾了半天,发现是Arduino 1.05能编译过去,到了arduino 1.6就不行了。该如何解决?
本帖最后由 jasonlintw 于 2017-2-13 11:01 编辑
請參考一下連結
NodeMCU - ESP8266 - TFT ILI9341
https://www.youtube.com/watch?v=T-1nIwKBfog
Library for ESP and ArduinoIDE: https://github.com/gnulabis/UTFT-ESP8266 LCD --- NodeMCU
Vcc---Vcc
GND---GND
CS--- D8 / 1k ohm resistor
Reset---D1
D/C--- D2 /1k ohm resistor
SDI/mosi---D7 / 1k ohm resistor
SCK---D5 / 1k ohm resistor
LED---Vcc
页:
[1]