【问题标题】:Wemos D1 and TFT LCD shieldWemos D1 和 TFT LCD 屏
【发布时间】:2017-02-21 00:41:44
【问题描述】:

我正在使用类似 Arduino 的 WeMos D1 和 TFT LCD 屏。当我想运行一个像 graphicstest 这样的示例程序时,它不会编译该程序并给我这些错误:

Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);

A3' was not declared in this scope
A2' was not declared in this scope
A1' was not declared in this scope

这是定义引脚的代码:

#define LCD_CS A3 // Chip Select goes to Analog 3
#define LCD_CD A2 // Command/Data goes to Analog 2
#define LCD_WR A1 // LCD Write goes to Analog 1
#define LCD_RD A0 // LCD Read goes to Analog 0

【问题讨论】:

标签: arduino


【解决方案1】:

如果您查看 WeMos D1 板,您会发现没有 A1A2A3 引脚。
ESP8266 只有一个模拟引脚(A0),不能用作数字引脚。

【讨论】:

  • 现在我该如何定义这个 Adafruit_TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET);
  • 您不能将 LCD 用作屏蔽。您需要重新连接它以使用其他引脚,然后在代码中使用这些引脚。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多