0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

M5STACK BASIC / M5StickCPlus nvsを利用する

Posted at

不揮発な記憶領域を使おうと思い,nvsとやらを使ってみました。v1.11.0です。

UiFlowだとEEPROMと書かれていて,使うのはとても簡単でした。keyを指定して何らかの文字列を書き,同じkeyで呼び出すだけです。

image.png

REPLや素のMicroPythonではこんな感じでした。

>>> import nvs
>>> nvs.write_str('A','AA')
>>> nvs._key_map
{'A': 'AA'}
>>> nvs.read_str('A')
'AA'

いくつか気になる,不明点が。

  • 値の更新 実験したところできませんでした。
  • キーの削除 実験したところできませんでした。唯一,M5Burnerを使ったら全部消えました。
  • strからintの変更 できませんでした。
  • 値の一覧 nvs._key_map で少し見えますが,全部ではないようでした。

Arduinoを使えばもっといろいろできるのかもしれませんが...

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?