极客工坊

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 15532|回复: 3

NodeMCU(ESP8266) 驱动2.2寸TFT显示屏的问题

[复制链接]
发表于 2017-1-22 12:00:50 | 显示全部楼层 |阅读模式
手里有一块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
编译有误。



库是一个库,为什么会出现类型不正确或者没被声明?

求助高手。

回复

使用道具 举报

发表于 2017-1-22 17:57:30 | 显示全部楼层
有时候,一个库,也不是就自己一个人干完一件事的,它也会有外部依赖。显然,变量类型bitmapdatatype就是它一个外部依赖,找不到了。

你对照NANO的工程找一下,这个类型定义在什么地方,肯定在这个库的外部,或者就是你的库复制的时候丢了什么。一层层分析下去,就会有眉目。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2017-1-22 18:48:05 | 显示全部楼层
maidoo 发表于 2017-1-22 17:57
有时候,一个库,也不是就自己一个人干完一件事的,它也会有外部依赖。显然,变量类型bitmapdatatype就是它 ...

刚从新在nano上run了一下,也起不来了。 折腾了半天,发现是Arduino 1.05能编译过去,到了arduino 1.6就不行了。该如何解决?
回复 支持 反对

使用道具 举报

发表于 2017-2-13 10:23:21 | 显示全部楼层
本帖最后由 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
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 需要先绑定手机号

Archiver|联系我们|极客工坊

GMT+8, 2024-3-29 23:42 , Processed in 0.048507 second(s), 20 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表