Arduino stops predicting

I am using Arduino Nano 33 BLE Sense with edgeimpulse model on accelerometer data and trying to send predictions over Bluetooth. Example code (continuous acceleration) works fine, but with bluetooth it works fine until it keeps returning same prediction regardless of motion. Looks like it is predicting on same signal over and over. Any ideas what it could be?

Hi @copatiot,

Would you be able to share your project ID and .ino Arduino code with us (e.g. paste it into a Gist: so we can attempt to replicate the error?

Project ID : 105570

Here is code :

It seems to stop working in first minute after connected to bluetooth device.

It randomly goes into delay function (row 320) and doesn’t come back from there.
The value of delay is 2^31 - 1 when it happens. I guess it’s an overflow or something. From now on I will just check value before passing it into delay. But I wanna know if I am doing something wrong or is it a bug.

Hi @copatiot,

It looks like the pastebin was removed. Could you share it again? Also, how are you receiving the Bluetooth data? Is there a program you are using on the computer side? Finally, are you able to look at the serial data coming out of the Arduino board to compare it to the Bluetooth messages?