• Hello,

    I'm looking for to store a var in a permanent way (power off) and load at start (power on)
    i saw that @Gordon implement a way to store data since 2v05, but the example code is for log datas (implementative way) and it seems a beat complex just for store a counter var.

    have you a simple example to implement a counter (with a long type) storage over power-down?

    I've tried

    var memoire = require("Storage");
    let NumPoemeEncours = memoire.read("num"); // numero encours
      if (NumPoemeEncours == null || NumPoemeEncours == undefined  || NumPoemeEncours == "") {
          NumPoemeEncours = 1;
          console.log("numero du poeme inconnu", memoire.read("num"));
          console.log("numero du poeme connu", memoire.read("num"));

    but it does not works!

    what i'm doing wrong?

    thanks for your time.


Avatar for Mrbbp @Mrbbp started