Hi, I’m trying out SimpleFoC with Arduino Nano 33 IoT + BLDC and have got it working quite well.
SimpleFoC has an experimental low side current sensing support for SAMD21 and I wanted to try it. However, it’s not compiled in and hence cannot work.
The problem seems to be circular dependency. Some headers in Simple_FOC\src\current_sense\hardware_specific\samd\samd21_mcu.cpp
are included inside a #ifdef block that depends of a define that is set by said headers. Moving the headers before the #ifdef fixes the issue.
#include "../../hardware_api.h"
#include "samd21_mcu.h"
#ifdef _SAMD21_
...
Maybe this is Arduino IDE specific issue?