Skip to content
Snippets Groups Projects

ESP32 RTC Memory test

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Jannis Konrad
    RTC.py 216 B
    import machine
    r = machine.RTC()
    
    try:
      i = int(r.memory())
    except Exception as e:
      import sys
      sys.print_exception(e)
      i = 0
    
    i += 1
    
    print("\n\n", i, "\n\n")
    
    r.memory(str(i).encode())
    
    machine.deepsleep(i*100)
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment