-1

I am currently trying to control a servo from an Arduino for a laser turret through vscode. the problem is that vscode does not pick up on my library folder called <servo.h>. I have a folder named "workspace" with the servo library, the .ino file, and the workspace file for vscode.

Instead of platformIO, I'm using the Arduino extension for vscode. I'm using an Arduino UNO. here is the code so far:

#include <Servo.h>

Servo servo1;
Servo servo2;
int potval
int potpin = 0

void setup()

and here is what my c_cpp_properties.json file looks like:

{
    "configurations": [{
        "name": "Win32",
        "includePath": [
            "${workspaceFolder}
        ],
        "defines": [
            "_DEBUG",
            "UNICODE",
            "_UNICODE"
        ],
        "cStandard": "c17",
        "cppStandard": "c++17",
        "intelliSenseMode": "windows-msvc-x64"
    }],
    "version": 4
}

And I'm running Windows 10

paulsm4
  • 107,438
  • 16
  • 129
  • 179

1 Answers1

-1

Any local library file that is included must use "" instead of <>.
#include <Servo.h>
should be replaced with
#include "Servo.h"
Here is a post describing the difference between the two:
What is the difference between #include < filename > and #include “filename”?

David Ryan
  • 14
  • 2
  • If VScose is set up properly for Arduino, the angle brackets actually work. I use them all the time for external libraries. – lurker Jun 24 '21 at 02:48