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 1.8.49.0) (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.
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:
Start from a clean slate by deleting the library from your computer.
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.