What you're doing with storage.erase + .compact sounds fine to me. What errors are you getting?
I guess one issue is that compaction will take some time so might make you lose Bluetooth packets again - however I feel like you probably don't need to do except when you reset it/go to start recording. Normally I imagine you'll just be adding data.
© Espruino, powered by microcosm.
Report a problem