XIAO BLE Sense persistent data

Hi,
I am planning to build a device using BLE. Mobile app will be connected to the device and device will send data over bluetooth. But mobile device may not be around the device all the time or bluetooth may be turned off. So I need to store data on the device until app connects. BLE sense has 1MB flash & 2MB onboard flash. Can I use it to store data? If so, is there any library or I just use global variables?

Hello.
It’s better for you to store data to the 2MB onboard flash.
we have provide a demo of read and wirte to the onboard flash here

Before you run this demo code.
Please first download the arduino core and overwrite the arduino core in C:\Users\hk\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52

1 Like

Perfect ! Thank you. I will give it a try.

It worked like a charm! Thank you ! In case anyone else facing an issue like

Error during Upload: Property 'upload.tool.serial' is undefined

Add following line in boards.txt file ( ~/Library/Arduino15/packages/Seeeduino/hardware/nrf52/2.6.1/boards.txt)

xiaonRF52840Sense.upload.tool.default=nrfutil

below the following line.

xiaonRF52840Sense.upload.tool=nrfutil

Hello,
I did overwrite mentioned folder but all I get is an error:
fatal error: QSPIFBlockDevice.h: No such file or directory
and


Invalid library found in C:\Users\Mike\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\2.6.1\libraries\Spi_Flash: no headers files (.h) found in C:\Users\Mike\AppData\Local\Arduino15\packages\Seeeduino\hardware\nrf52\2.6.1\libraries\Spi_Flash

Where can I get QSPIFBlockDevice.h from?

Thank you.