Git Product home page Git Product logo

Comments (3)

sdetweil avatar sdetweil commented on June 27, 2024

well, part 1, DOAH, READ ... it uses flash and flash is wiped on firmware upload.. ...

now.. part 2, I'm not getting out what I put in..

do I have to commit after each write?,
example says no

my read code

char xx[]="some string of dummy data";
if(EEPROM.isValid()){
    Serial.println("config present");
    Serial.println("using stored data");
    //  create a buffer
    char x[sizeof(xx)+10];
    // clear it, expect we will read less data than buffer size, most of the time.
    memset(x,0,sizeof(x));
    // loop thru the eeprom (whatever it is) 
    for (int i=0; i<sizeof(xx)+10; i++) {
        Serial.print(" ");
        // get a character
        unsigned char y = EEPROM.read(i);
        // if its not a null terminator (c stringish)
        if( y != 0){
          // save it in the buffer  
          x[i]=y;
        }
        // done with the read loop
        else
          break;
    }
}

from flashstorage.

sdetweil avatar sdetweil commented on June 27, 2024

only 25 chars of my 110 chars are retrievable from flash on my Nano 33 IOT
i write ascii chars and then '\0', and then commit()
I read til I see the '\0'

from flashstorage.

sdetweil avatar sdetweil commented on June 27, 2024

ok, don't know why, but it thinks there is a '\0' embedded in the data, but not..

anyhow, now write 1 byte length, rest of data
read 1 byte length, rest of data..

all ok

from flashstorage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.