Error while deploying accelorometer on arduino nano 33 ble

I am getting the below error while deployment of a simple accelerometed example on the arduino nano 33 ble:

C:\Users\User\AppData\Local\Temp.arduinoIDE-unsaved2023023-2440-ipzmhk.cfvsa\nano_ble33_sense_accelerometer\nano_ble33_sense_accelerometer.ino:143:2: error: #error “Invalid model for current sensor”
#error “Invalid model for current sensor”
^~~~~

exit status 1

Compilation error: #error “Invalid model for current sensor”

Hi @amits,

Can you share your project ID so that I may try to replicate the error?

Hi Shawn,
it is 177354

Hi @amits,

Thanks. It looks like this is a known error (I have filed an issue with the developers). The last 3 lines of the example likely look like this:

#if !defined(EI_CLASSIFIER_SENSOR) || EI_CLASSIFIER_SENSOR != EI_CLASSIFIER_SENSOR_ACCELEROMETER
#error "Invalid model for current sensor"
#endif

Since we started supporting IMU fusion by default, this check is no longer valid (i.e. EI_CLASSIFIER_SENSOR != EI_CLASSIFIER_SENSOR_ACCELEROMETER fails). The workaround for now is to update these last 3 lines to the following:

#if !defined(EI_CLASSIFIER_SENSOR) || EI_CLASSIFIER_SENSOR != EI_CLASSIFIER_SENSOR_FUSION
#error "Invalid model for current sensor"
#endif
3 Likes

Yes, that worked. thanks!

1 Like