Unable to import the libraries correctly

I am trying to use the Arduino IDE 1.8.15 to program my Arduino. When I download the following code along with the libraries from the same link: https://github.com/SolidGeek/VescUart and using the example: https://github.com/SolidGeek/VescUart/tree/master/examples/getVescValuescompile it, it seems to giving me an error that the VescUart file seems to be missing. I did ctrl+shift+N and also tried adding the library files and these library files are in the same folder as the .ino code. but still it keeps giving me that the header file is missing. Can someone help me with this please?

Error message below:

Arduino: 1.8.15 (Windows Store (Windows 10), Board: "Arduino MKR NB 1500"

getVescValues:9:10: fatal error: VescUart.h: No such file or directory

 #include <VescUart.h>


compilation terminated.

exit status 1

VescUart.h: No such file or directory

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Image attached

The problem is that you have not installed the library. I see you have copied the library files into the sketch folder. It is possible to do this, but you would need to adjust the #include directive syntax. The angle braces syntax (e.g., #include <VescUart.h>) instructs the build system to look for the file in the standard include search paths. But because you didn't install the library, it's not there, thus the error.

If you want to #include files from the sketch folder, you must use the double quotes syntax (e.g., #include "VescUart.h").

Although it is possible to use the library in the current location mashed into the sketch folder, I recommend only doing that if you have a good reason. I suspect that you don't actually have a good reason for doing it and it was only an attempt to resolve the error caused by not having the library installed.

You can install and use the library by following these instructions:

  1. Start from a clean slate by deleting the library from your computer.
  2. Download a fresh copy of the library: https://github.com/SolidGeek/VescUart/archive/refs/heads/master.zip
  3. Start the Arduino IDE.
  4. Select Sketch > Include Library > Add .ZIP Library from the Arduino IDE's menus.
  5. Select the downloaded file.
  6. Click the Open button.
  7. Select File > Examples > VescUart > getVescValues from the Arduino IDE's menus.

You should now be able to compile the example sketch.

1 Like

Aaahhh makes sense.. let me give that a shot. Thanks for the help! :slight_smile:

You're welcome. I'm glad if I was able to be of assistance. Enjoy!

Hi @pert, had another question related to this above code, it seems to be that I am unable to receive data using the UART pins. I have connected the TX pin on VESC to RX pin on my MKR1500 and RX pin on the vesc to the TX pin on the MKR 1500. Is there any reason why it would be able to get the data. the output keep saying failed to get data. The only diff is I am using 5V supply for the MKR1500 using my laptop and the VESC is powered using a power supply.

Hi !
I don't know if this is the case, but you have to have a common ground, between the vesc and your board.


This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.