I'm new to using BLE on the Arduino platform. I was developing on the Nano 33 IoT a loop that toggles between gathering data on BLE and sending information on Wifi, and I realised that when I call the following loop, there appears to be a memory leak that causes the processor to crash after a few cycles.
... scan for 1min...
This happens when there is nothing else in the sketch. I'm suspecting that calling BLE.end() does not destroy all allocated resources. Does anyone else have a similar experience, and could anyone point me to the right direction on how to solve this?
I'm current using the following envrionment:
Board: Nano 33 IoT
Arduino IDE/Core: 1.8.15
Thanks so much for the help!