You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
#include <Arduino.h>
#define LED D0 // Led in NodeMCU at pin GPIO16 (D0).
void setup() {
pinMode(LED, OUTPUT); // LED pin as output.
digitalWrite(LED, LOW); // turn the LED on.
}
Defining port with static const uint8_t D0 = 16; creates the following error:
mpu6050MicrosOutput:2:22: error: redefinition of 'const uint8_t D0'
static const uint8_t D0 = 16;
^
In file included from C:\Users\[USERNAME]\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.2\cores\esp8266/Arduino.h:296:0,
from C\project\mpu6050MicrosOutput.ino:1:
C:\Users\[USERNAME]\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.2\variants\nodemcu/pins_arduino.h:40:22: error: 'const uint8_t D0' previously defined here
static const uint8_t D0 = 16;
^
Using "C_Cpp.intelliSenseEngine": "Tag Parser" turns off IDE errors, Although, makes development vulnerable to mistakes. Any solutions?
The text was updated successfully, but these errors were encountered:
i3130002
changed the title
identifier "D0" is undefinedC/C++(20)
Identifier "D0" is undefinedC/C++(20)
Jan 8, 2021
I'm using
ESP8266 NodeMcu
withArduino
andVS code
and gettingidentifier "D0" is undefined C/C++(20)
while it works pretty well after uploading.Here is my configs:
c_cpp_properties.json:
settings.json:
Code:
Defining port with
static const uint8_t D0 = 16;
creates the following error:Using
"C_Cpp.intelliSenseEngine": "Tag Parser"
turns off IDE errors, Although, makes development vulnerable to mistakes. Any solutions?The text was updated successfully, but these errors were encountered: