I am running the Arduino IDE 2.1.1, using an Arduino Nano 33 BLE, with a Sparkfun TMC6300 brushless motor controller, with a SparkFun ROB-20441 motor and using (eventually) an MT6701 as a magnetic encoder.
I used the IDE Library Manager to get the Simple FOC 2.3.0 library.
When I open any example code in the IDE, and try to compile without any changes, I get compiler errors.
Can anyone give me any ideas on if this combination of hardware should work, and what might be going on? My gut is saying that the Arduino Nano 33 BLE is not supported, but per the docs, I thought it is.
Thanks,
Chuck
The compiler errors that I get are specifically:
/Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.cpp: In member function ‘void StepDirListener::enableInterrupt(void ()())':
/Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.cpp:16:67: error: no matching function for call to 'attachInterrupt(int&, void (&)(), int&)’
attachInterrupt(digitalPinToInterrupt(pin_step), doA, polarity);
^
In file included from /Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/variants/ARDUINO_NANO33BLE/pinmode_arduino.h:23:0,
from /Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/Arduino.h:26,
from /Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.h:4,
from /Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.cpp:1:
/Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/api/Common.h:113:6: note: candidate: void attachInterrupt(pin_size_t, voidFuncPtr, PinStatus)
void attachInterrupt(pin_size_t interruptNumber, voidFuncPtr callback, PinStatus mode);
^~~~~~~~~~~~~~~
/Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/api/Common.h:113:6: note: conversion of argument 3 would be ill-formed:
/Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.cpp:16:59: error: invalid conversion from ‘int’ to ‘PinStatus’ [-fpermissive]
attachInterrupt(digitalPinToInterrupt(pin_step), doA, polarity);
^~~~~~~~
In file included from /Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/Arduino.h:127:0,
from /Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.h:4,
from /Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.cpp:1:
/Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/overloads.h:35:6: note: candidate: void attachInterrupt(PinName, voidFuncPtr, PinStatus)
void attachInterrupt(PinName interruptNumber, voidFuncPtr callback, PinStatus mode);
^~~~~~~~~~~~~~~
/Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/overloads.h:35:6: note: conversion of argument 3 would be ill-formed:
/Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.cpp:16:59: error: invalid conversion from ‘int’ to ‘PinStatus’ [-fpermissive]
attachInterrupt(digitalPinToInterrupt(pin_step), doA, polarity);
^~~~~~~~
In file included from /Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/api/ArduinoAPI.h:29:0,
from /Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/Arduino.h:27,
from /Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.h:4,
from /Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.cpp:1:
/Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/api/Interrupts.h:38:27: note: candidate: template void arduino::attachInterrupt(pin_size_t, arduino::voidTemplateFuncPtrParam<T*>, PinStatus, T*)
template void attachInterrupt(pin_size_t interruptNum, voidTemplateFuncPtrParam<T*> userFunc, PinStatus mode, T* param) {
^~~~~~~~~~~~~~~
/Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/api/Interrupts.h:38:27: note: template argument deduction/substitution failed:
/Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.cpp:16:67: note: candidate expects 1 argument, 0 provided
attachInterrupt(digitalPinToInterrupt(pin_step), doA, polarity);
^
In file included from /Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/api/ArduinoAPI.h:29:0,
from /Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/Arduino.h:27,
from /Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.h:4,
from /Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.cpp:1:
/Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/api/Interrupts.h:21:27: note: candidate: template void arduino::attachInterrupt(pin_size_t, arduino::voidTemplateFuncPtrParam, PinStatus, T&)
template void attachInterrupt(pin_size_t interruptNum, voidTemplateFuncPtrParam userFunc, PinStatus mode, T& param) {
^~~~~~~~~~~~~~~
/Users/…/Library/Arduino15/packages/arduino/hardware/mbed_nano/4.0.2/cores/arduino/api/Interrupts.h:21:27: note: template argument deduction/substitution failed:
/Users/…/Arduino/libraries/Simple_FOC/src/communication/StepDirListener.cpp:16:67: note: candidate expects 1 argument, 0 provided
attachInterrupt(digitalPinToInterrupt(pin_step), doA, polarity);
^