Arduino Nano 33 BLE UART VESC not working

I am trying to use an Arduino Nano 33 BLE to control a VESC via the VescUART library here. Running any of the example programs results in errors with setting up the UART device. The code and errors are below. Any help would be greatly appreciated!

Code:

/*
  Name:    setCurrent.ino
  Created: 19-08-2018
  Author:  SolidGeek
  Description: This is a very simple example of how to set the current for the motor
*/

#include <VescUart.h>

/** Initiate VescUart class */
VescUart UARTv;

float current = 1.0; /** The current in amps */

void setup() {
  Serial.begin(9600);
  /** Setup UART port (Serial1 on Atmega32u4) */
  Serial1.begin(19200);
  
  while (!Serial1) {;}

  /** Define which ports to use as UART */
  UARTv.setSerialPort(&Serial1);
}

void loop() {
  
  /** Call the function setCurrent() to set the motor current */
  UARTv.setCurrent(current);

  // UART.setBrakeCurrent(current);
  
}

Errors:

Arduino: 1.8.13 (Windows 10), Board: "Arduino Nano 33 BLE"

In file included from C:\Users\sailo\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf.h:79:0,

                 from C:\Users\sailo\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/device/cmsis.h:21,

                 from C:\Users\sailo\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/TARGET_MCU_NRF52840/TARGET_ARDUINO_NANO33BLE/PinNames.h:20,

                 from C:\Users\sailo\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\variants\ARDUINO_NANO33BLE/pinmode_arduino.h:17,

                 from C:\Users\sailo\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino/Arduino.h:29,

                 from sketch\setCurrent.ino.cpp:1:

C:\Users\sailo\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf52840.h:2405:67: error: expected ')' before '*' token

 #define NRF_POWER                       ((NRF_POWER_Type          *) NRF_POWER_BASE)

                                                                   ^

C:\Users\sailo\Documents\Arduino\libraries\VescUart-master\src/datatypes.h:385:3: note: in expansion of macro 'NRF_POWER'

 } NRF_POWER;

   ^

C:\Users\sailo\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf52840.h:2405:67: error: expected ')' before '*' token

 #define NRF_POWER                       ((NRF_POWER_Type          *) NRF_POWER_BASE)

                                                                   ^

C:\Users\sailo\Documents\Arduino\libraries\VescUart-master\src/datatypes.h:385:3: note: in expansion of macro 'NRF_POWER'

 } NRF_POWER;

   ^

C:\Users\sailo\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf52840.h:2405:67: error: expected ')' before '*' token

 #define NRF_POWER                       ((NRF_POWER_Type          *) NRF_POWER_BASE)

                                                                   ^

C:\Users\sailo\Documents\Arduino\libraries\VescUart-master\src/datatypes.h:420:2: note: in expansion of macro 'NRF_POWER'

  NRF_POWER power;

  ^

C:\Users\sailo\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.3.2\cores\arduino/mbed/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_SDK_15_0/modules/nrfx/mdk/nrf52840.h:2405:67: error: expected ')' before '*' token

 #define NRF_POWER                       ((NRF_POWER_Type          *) NRF_POWER_BASE)

                                                                   ^

C:\Users\sailo\Documents\Arduino\libraries\VescUart-master\src/datatypes.h:420:2: note: in expansion of macro 'NRF_POWER'

  NRF_POWER power;

  ^

exit status 1

Error compiling for board Arduino Nano 33 BLE.

Index error: could not find referenced tool name=xtensa-esp32-elf-gcc version=1.22.0-80-g6c4433a-5.2.0 packager=esp32

Index error: could not find referenced tool name=esptool_py version=2.6.1 packager=esp32

Index error: could not find referenced tool name=mkspiffs version=0.2.3 packager=esp32

Index error: could not find referenced tool name=xtensa-esp32-elf-gcc version=1.22.0-80-g6c4433a-5.2.0 packager=esp32

Index error: could not find referenced tool name=esptool_py version=2.6.1 packager=esp32

Index error: could not find referenced tool name=mkspiffs version=0.2.3 packager=esp32

Index error: could not find referenced tool name=xtensa-esp32-elf-gcc version=1.22.0-80-g6c4433a-5.2.0 packager=esp32

Index error: could not find referenced tool name=esptool_py version=2.6.1 packager=esp32

Index error: could not find referenced tool name=mkspiffs version=0.2.3 packager=esp32



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

Did you bother to read the notes for that library?

It says
The library is not backwards compatible, so you have to upload the newest firmware to your VESC.

I did and the errors are before I even get to the vesc. I cannot compile in the Arduino IDE so I am confident that the VESC firmware isnt the issue here.

Talk to the guy who wrote the example program.

.

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