Hi, XIAO BLE Sense has alot of things common with Arduino BLE Sense and for that reason I was trying to deploy a model that I had previously trained on Arduino BLE and deploy it on XIAO however it resulted in an 1002 error which is caused due to memory. I wanted to run audio classification but all the tutorials are about IMU sensor. If someone has idea about how to deal with this problem or any example on audio classification on XIAO BLE would help. Thanks
Both the Arduino Nano 33 BLE Sense and the Xiao BLE Sense have the same nRF52840 with the same amount of RAM and flash, so the Xiao should work (in theory).
What code are you attempting to run? Can you share it (e.g. via https://gist.github.com/)? Can you give us the exact error message you are seeing and when it occurs (for example, just after reset)?
HI @shawn_edgeimpulse, Here is the github repo for the project and the instructions are written in README that are very simple. So, I can run this project successfully on Arduino BLE Sense (Screenshot attached) However, when I run this same sketch on XIAO BLE Sense then it gives the error which is also attached. Yes, both the devices have the same memory so they should run the program similarly. Thanks.
Use this library: ei-audio-analytics-arduino-1.0.23
It looks like there’s some other code running for the BLE (as given by the “Connected to central” message). I’m not sure what this is doing, but it’s possible it is interfering with the inference code (i.e. causing the MCU to run out of memory or miss buffer writing deadlines). Could you remove any extra code (such as whatever is causing the Xiao to connect to a central) and try running inference again?
Thanks Shawn, Yes it works without the BLE functionality. However, since both devices have the same memory constraints shouldnt the program work just as well on XIAO BLE Sense as it does on Arduino? I would appreciate if you have any pointers. Other than that the issue is closed thanks for you help.
By default, the BLE code is not running on the Arduino Neno 33 BLE Sense. You have to include libraries and/or write some code to make it work. It looks like whatever code you were running on the Xiao started to run the BLE code in the background, which takes up memory and processing time. The “-1002” code means “out of memory” (ERR: MFCC failed (-1002)).