phyphox Forums
To transmit more than five sets of data, what should I do? - Printable Version

+- phyphox Forums (https://phyphox.org/forums)
+-- Forum: App-Feedback (https://phyphox.org/forums/forumdisplay.php?fid=6)
+--- Forum: Feature requests (https://phyphox.org/forums/forumdisplay.php?fid=8)
+--- Thread: To transmit more than five sets of data, what should I do? (/showthread.php?tid=2128)



To transmit more than five sets of data, what should I do? - zzzz - 04-17-2025

The project I’m working on requires transmitting seven sets of data, which exceeds the five-set limit imposed by phyphox. I’m wondering if there’s a way to bypass this restriction? I’m currently exploring the use of arrays or strings to address this issue and would appreciate any suggestions.


RE: To transmit more than five sets of data, what should I do? - emmanuel - 04-17-2025

Hey,
I have exactly the same problem.
I just post a new thread...


RE: To transmit more than five sets of data, what should I do? - Jens Noriʇzsɔɥ - 04-17-2025

Five floats, i.e. 20 bytes, is a (current?*) limitation of the Arduino BLE stack and it does not exist for ESP32 based microcontrollers. So, depending on the architecture, there are different approaches that, however, require a “handwritten” .phyphox file (check the CO2 demo, for instance, how to include it in your sketch):
  • use a float array in phyphox::write (esp32 only),
  • use a byte array in phyphox::write and convert your data appropriately. Two byte integers (and a scaling factor in the .phyphox file) might provide sufficient accuracy for your purpose. You could also use different sizes for different data,
  • if rate is not that much of an issue, you could use one of the channels as a data index, so you could have eight floats in two data packages – leading to half the rate.

* Arduino is switching from mbed to zephyr. We have not looked into the first beta yet, though.