📦 Archived documentation: r1 (committed 2026-08-05) View current documentation →
Available on: Flexs Q5C Flexs Q5M

nv.set()

nv.set(data, [offset])

Stores a string in non-volatile memory.

Writes data at offset (default 0). Serialise objects with string() first. Take care that regions written at different offsets don't overlap.

Arguments

NameTypeRequiredDefaultDescription
data string yes — The string to store — use string(obj) for objects.
offset number optional 0 Byte offset within the 4 kB memory.

Example

nv.set(string(sp));          // setpoints at offset 0
nv.set(string(users), 2048); // users table at offset 2048