6 years, 4 months ago.

MBED + microbit + storage?

Hi to All, I try to store some data to flash, using uBit.storage.put, and read it with uBit.storage.get, but so far without success. I need a help,

this is how I save data : keyname=“CMBF00”; function_text_ext="<D00OL><ND00DIGITAL OUT>"; uBit.storage.put(keyname, (uint8_t *)&function_text_ext, sizeof(function_text_ext));

I read it with : keyname=“CMBF00”; char command_buffer[32]; KeyValuePair* flash = uBit.storage.get(keyname); memcpy(command_buffer, flash->value, sizeof(32));

RESULT= “<D00” , and whatever data I store read function return only 4 bytes!!

any advice? Thanks, Damir

Be the first to answer this question.