Home

Awesome

Mgogo

A library to convert Adafruit Macropad RP4020 settings to and from binary for read and write to micro-controller non-volatile memory.

Inspired by the Redis serialization protocol specification (RESP)

Basic types

typelengthprefixnotes
SWORD3 bytes#short word
WORD7 bytes_
LWORD15 bytes$long word
PCODE1 byte+push code
RCODE1 byte-release code
(END)1 byte\nsignals end of binary array in NVM.

Complex types

typeprefixnotes
ARRAY*nof length n; may only hold a single type
KCODE+-union of PCODE | RCODE
COMM<WORD (label) + SWORD (LED color) + ARRAY<KCODE>
PAGE[LWORD (label) + ARRAY<COMM>

Intended limitations

Strings beyond 15 characters in length are not supported. In actuality the display UI cannot handle strings longer than this anyway.

Unicode is not supported by the default Circuit Python font, so one byte per character should be sufficient.

About the name

Mgogo is Swahili for woodpecker, a bird with a sense of rhythm.