Hi, I have a problem compiling a simple blinking LED for a WeMos D1 R2 board. When I switch the board setting to Arduino Uno, the compiling is ok.Below are the error message and my code:
void setup() {
pinMode(14, OUTPUT); // set the digital pin as output.
}
void loop() {
digitalWrite(14, HIGH);// turn the LED off.(Note that LOW is the voltage level but actually
//the LED is on; this is because it is acive low on the ESP8266.
delay(1000); // wait for 1 second.
digitalWrite(14, LOW); // turn the LED on.
delay(1000); // wait for 1 second.
}
Your sketch compiles without error when I select board: "LOLIN(WEMOS) D1 R2 & mini". It does so for both "ESP8266 Community v2.7.4" and the latest "ESP8266 Community v3.0.0".
It was reported here that this error is caused by having the CPLUS_INCLUDE_PATH environment variable defined. Apparently the compiler is affected by this value, which might be useful in non-Arduino applications, but is disastrous when using the Arduino build system.
Hi, thank for your reply. Anyway, I am still confuse after read the link you sent to me. From the link, the first guy said " If I remove the environment variable CPLUS_INCLUDE_PATH , the blink sketch compiles normally." My question is how to remove environment variable CPLUS_INCLUDE_PATH? Sorry asking this question as I am new to arduino environment.