解决用vscode开发arduino时Serial未定义
在工作目录编辑c_cpp_properties.json
文件
添加defines
字段
{ "configurations": [ { "name": "Win32", "includePath": [ "D:\\Program Files (x86)\\Arduino\\tools\\**", "D:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\**", "D:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\avr\\include", "D:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr\\lib\\gcc\\avr\\7.3.0\\include", "D:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" ], "forcedInclude": [ "D:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino\\Arduino.h" ], "intelliSenseMode": "msvc-x64", "defines": [ "USBCON" ] } ], "version": 4 }