0 votes
in ESP8266 WiFi Color Kit by (160 points)
Arduino: 1.8.5 (Mac OS X), Board: "Generic ESP8285 Module, 80 MHz, ck, 40 MHz, 1M (no SPIFFS), 2, v2 Lower Memory, Serial1, None, All Flash Contents, 115200"

In file included from /Users/kenchalk/Documents/Arduino/libraries/esp8266-weather-station-color/esp8266-weather-station-color.ino:26:0:

settings.h:38: error: 'D1' was not declared in this scope

 #define TFT_CS D1

                ^

/Users/kenchalk/Documents/Arduino/libraries/esp8266-weather-station-color/esp8266-weather-station-color.ino:83:31: note: in expansion of macro 'TFT_CS'

 ILI9341_SPI tft = ILI9341_SPI(TFT_CS, TFT_DC);

                               ^

settings.h:37: error: 'D2' was not declared in this scope

 #define TFT_DC D2

                ^

/Users/kenchalk/Documents/Arduino/libraries/esp8266-weather-station-color/esp8266-weather-station-color.ino:83:39: note: in expansion of macro 'TFT_DC'

 ILI9341_SPI tft = ILI9341_SPI(TFT_CS, TFT_DC);

                                       ^

settings.h:42: error: 'D3' was not declared in this scope

 #define TOUCH_CS D3

                  ^

/Users/kenchalk/Documents/Arduino/libraries/esp8266-weather-station-color/esp8266-weather-station-color.ino:88:24: note: in expansion of macro 'TOUCH_CS'

 XPT2046_Touchscreen ts(TOUCH_CS, TOUCH_IRQ);

                        ^

settings.h:43: error: 'D4' was not declared in this scope

 #define TOUCH_IRQ  D4

                    ^

/Users/kenchalk/Documents/Arduino/libraries/esp8266-weather-station-color/esp8266-weather-station-color.ino:88:34: note: in expansion of macro 'TOUCH_IRQ'

 XPT2046_Touchscreen ts(TOUCH_CS, TOUCH_IRQ);

                                  ^

/Users/kenchalk/Documents/Arduino/libraries/esp8266-weather-station-color/esp8266-weather-station-color.ino: In function 'void setup()':

settings.h:39: error: 'D8' was not declared in this scope

 #define TFT_LED D8

                 ^

/Users/kenchalk/Documents/Arduino/libraries/esp8266-weather-station-color/esp8266-weather-station-color.ino:158:18: note: in expansion of macro 'TFT_LED'

   Serial.println(TFT_LED);

                  ^

exit status 1

'D1' was not declared in this scope

1 Answer

0 votes
by (10.3k points)
Hi

The D* aliases are only defined if you choose a NodeMCU or Wemos board. They are not defined for the 'Generic ESP8285 Module' that you obviously chose. You can work around this by either changing all the occurances of the D*-labels, or by changing to another board or by defining aliases by yourself:

Are you using ThingPulse hardware? Then you should use a Wemos D1 board

Daniel - ThingPulse

Welcome to ThingPulse Q&A, where you can ask questions and receive answers from other members of the community.

https://thingpulse.com

...