I'm trying to write code for some sensor nodes that use nrf24l01+ to transmit values to a gateway, but I'm having some issues getting the code the way I want it.
I can easily use a struct to define a hardcoded set of data that I send to the gateway, but that requires that the gw also uses the exact same struct, which makes it a bit harder as I expand the sensor network.
I want to define what is sent dynamically (ie, the node self-discovers available sensors and sends only those values, or the node ignores faulty sensor values and do not send them). I also want to be able to add a new node with a new type of sensor (ie, add a new data type) without upgrading all the other nodes.
I've tried googling to find a suitable protocol and/or example code I could use, but I have so far not been able to find anything usable. But sensor nodes aren't exactly breaking new ground, so there's gotta be someone who has written something like this before, right?
Is the protocol/code I'm looking for out there?