Nano 33 BLE sense crashes with accelerometer movement

we have a good module for a “magic wand” that detects if you motion a “check” or an “x” in mid air.
no mater how we run the library on our Arduino 33 BLE sense, the code always freezes just as we begin moving the wand. if we leave it on the table, the code will keep running. as soon as we pick it up the code freezes.
is this something to do with memory? why would moving the wand cause a freeze?
please help we are completely stuck.
we are using the newer 2.0 IDE

thank you!

Hello @jebay1,

Could it be your UART connection that is unstable? (USB cable or USB connector)?

Best,

Louis

connection is good. everything is mounted to a wand. i also have no problems collecting data for 60 seconds of movement. only when i run the arduino code, it uploads and run while it’s sitting on the table, and as soon as it’s picked up the code freezes. same result when i run the raw data in the CMD window using teh edge-impulse-daemon raw command. it runs till i pick it up.
can it be a memory issue or processing issue?
thank you!

when uploading the arduino library, i got an error saying:
EI_CLASSIFIER_RAW_SAMPLES_PER_FRAME
should be equal to 3 (instead of 9). i change it to 3 in the library so the code will upload.
would that be causing it to freeze while running?

Hello @jebay1,

It seems that @Arjan fixed this issue. See Arduino Sense 33 REV2 stuck during second audio sampling iteration - #8 by Arjan

Best,

Louis

Yes, fix is now available

Hi @jebay1

Can you share your project ID? I’ll have a look.

thx

thanks @ei_francesco
project ID 336432

we have been updating the EI_CLASSIFIER_RAW_SAMPLES_PER_FRAME variable in the code to set its requirement to equal to 9 (instead of requiring it to equal 3). that seems to stop the code from freezing upon accelerometer movement. (nano 33 ble sense rev 1)

the following line of code also won’t compile, but we just comment it out and the code works:
#error “Invalid model for current sensor”

thank you!

hi @ei_francesco (and @louis )
i still cannot get the nano 33 deployment to run. any other ideas?
i cloned the project. neither version runs on the nano
Project ID 318980 (original)
project ID 336432 (V2)
thank you!

Hello @jebay1,

I just tried to run your model on my Arduino Nano 33 BLE sense (rev1). I had no issue running the default arduino example:

Can you make sure to use the sensor fusion example as you have used all the axis to train your model:

Best,

Louis

@luisomoreau @louis
It works!
i was not aware of the sensor fusion example or that it was required when using multiple sensor inputs to train.
thank you thank you thank you

1 Like