Thank you all for everything, the problem has been solved. Here are the results:
configFile = null; configInit = function(){ if (configFile === null) { configFile = getFile(); } }; configWrite = function(index, value){ configInit(); configFile.write(index, value); }; configRead = function(index){ configInit(); return E.toString(configFile.read(index)); };
Usage:
>configWrite(0, "hello") =undefined >configWrite(1, "world") =undefined >configRead(0) ="hello" >configRead(1) ="world" >
@ceremcem started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Thank you all for everything, the problem has been solved. Here are the results:
Usage: