Exemple for note-c-zero

Hello,
Would it be possible to have an example of how to use the “note-c-zero” library (GitHub - blues/note-c-zero: C interface to the notecard that uses zero static read-write memory nor requires any dynamic allocator)?
Thank you in advance for your help.

Hi @lejibxl

The note-c-zero library is quite specific to the application, could you perhaps provide some more information about what you are trying to achieve? You’ll need to provide hooks for your hardware’s peripherals to drive the library. Happy to put together an example for you (although it may be based on one of our feather MCU boards)!

Thanks,
Alex

Hi @abucknall ,
This is for remotely monitoring and controlling a power bank.
We are going to use a simple STM32G0 for this monitoring, which explains why I have limited RAM and FLASH space.
Since there is no explanation or documentation about this library available online, it would be fantastic if I could get an example from you.

@lejibxl,

It turns out that we do have an example of note-c-zero being used with the Swan MCU (STM32L4R5), GitHub - blues/jsonb-swan. I’ll apologise as we’ve just made this public so it’s not thoroughly documented but should give you something to start reading while we prepare a better example.

Let me know how you get on with this repo,

Alex

Hello @abucknall ,
Are you sure about the jsonb library? Have you tested it ?
This in ‘jsonb.h’ seems strange to me:

#define JSONB_BEGIN_OBJECT          0x10
#define JSONB_END_OBJECT            0x11
#define JSONB_BEGIN_ARRAY           0x12
#define JSONB_END_ARRAY             0x13

#define JSONB_NULL                  0x20
#define JSONB_TRUE                  0x21
#define JSONB_FALSE                 0x22

// A UTF-8 JSON item name, null-terminated
#define JSONB_ITEM                  0x30

// A UTF-8 JSON string, null-terminated
#define JSONB_STRING                0x40

// A binary buffer, prefixed by its length
#define JSONB_BIN8                  0x51
#define JSONB_BIN16                 0x52
#define JSONB_BIN24                 0x53
#define JSONB_BIN32                 0x54

Hi @lejibxl,

I’m checking this with the team, as they are currently overhauling note-c-zero, including adding testing. I’ll get back to you as soon as I have something verified and tested, thanks for your patience.

Alex

Thank you very much.