But let´s say that I want to read 4 sensors at 100Hz for 15 seconds and then publish them to an MQTT. So it would be up to 6000 values that I need to publish to the broker. It is not important to publish these values exactly in real time as I suspect that could be a problem. But directly after the readings goes below the threshold value they need to be published.
Most of the MQTT-examples that I´ve found only publish couple of readings at a time.
Should I store these readings in int arrays and then publish the whole array or is it possible to publish each separate value in this array?
If it´s best to publish the array as one value do I need to convert these values to a char array or is there a way that are more efficient?
Maybe someone here have experience to deal with this type of problem
The connection to the MQTT server could be quite slow with GPRS up to 4G