This repository was archived by the owner on Oct 1, 2024. It is now read-only.
identifier "Serial" is undefined #808
Closed
Description
My VS Code have a problem:identifier "Serial" is undefined
but I upload program to my arduino nano OK.
this is my arduino file:
void setup(){
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(9600);
}
void loop(){
digitalWrite(LED_BUILTIN, HIGH);
Serial.println("hello arduino 2333333333333");
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
this is arduino.json
{
"board": "arduino:avr:nano",
"configuration": "cpu=atmega328old",
"programmer": "AVRISP mkII",
"sketch": "serialPort.ino",
"port": "COM9"
}
this is c_cpp_properties.json
{
"configurations": [
{
"name": "Win32",
"includePath": [
"C:\\\\Arduino\\\\tools\\\\**",
"C:\\\\Arduino\\\\hardware\\\\arduino\\\\avr\\\\**",
"C:\\\\Arduino\\\\hardware\\\\arduino\\\\avr\\\\cores\\\\arduino\\\\**",
"C:\\\\Arduino\\\\hardware\\\\tools\\\\avr\\\\avr\\\\include\\\\avr\\\\**",
"C:\\\\Arduino\\\\hardware\\\tools\\\\**",
"C:\\\\Arduino\\\\hardware\\\tools\\\\avr\\\\avr\\\\include\\\\**"
],
"forcedInclude": [
"C:\\\\Arduino\\\\hardware\\\\arduino\\\\avr\\\\cores\\\\arduino\\\\Arduino.h"
],
"intelliSenseMode": "gcc-x64",
"compilerPath": "C:/mingw64/bin/gcc.exe",
"cStandard": "c11",
"cppStandard": "c++17"
}
],
"version": 4
}