External Links

Creative Science Centre


Library Storage

// #include "http://www.byvac.com/mBlib/flb/Library/2016/lib_store.bas"

Non-Volatile store: From version 2.31 there are two commands that allow storage of data to the flash. This can be useful to save data when the power is switched off.

It is recommended that either this library be used or at least understood as the commands can be used to erase vital areas of program.

This library will store up to 255, 32bit of user data to flash. It works in an erase when full fashion whereby when the storage is filled up, an erase takes place and the new data is stored at the beginning.

  • flashstore.store(*values(),length) // stores the array to the flash store in an erase when full fashion. This means that when the storage is full all previous data will be removed.
  • flashstore.get(*values(),length) // retrieves the last array stored


The purpose of this store is to save a single set of values that can be retrieved at any time including when a power cycle or reset has taken place.

function saveTest(offset)
dim j, tosave(6)
    // put some values into an array
    for j = 0 to 5
        tosave(j) = j + offset

function getTest()
dim j, getary(6)
     // show it
     for j = 0 to 5
         print getary(j),