phyphox Forums

Full Version: Detect when BLE connection is made (Arduino library)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Greetings! I'm experimenting with uploading data from a lengthy Arduino experiment (up to several hours, which makes it impractical to read sample-by-sample on an iPhone because of power & auto-off considerations). Typical sample sizes will be 500 - 20000 samples, in an Arduino environment using an ESP32. I'd like to upload these samples as soon as a BLE connection is made to the device and the "run" icon is tapped. Is there a way to detect, within the provided Arduino library (great work!), when Phyphox has been activated & is ready to receive & record data? So that when the connection is made & the run icon is tapped, the data can be uploaded from the Arduino app in a burst? (The timebase in minutes is recorded as one channel of data & is used as the X axis.)

I've looked through the library code & don't see an obvious way to do this. Any help would be greatly appreciated!
Hey,

thanks for bringing this up. Currently its just possible to get the current number of connections with:

Code:
uint16_t PhyphoxBLE::currentConnections

Unfortunately there is no way to "auto-start" the experiment or get information about the current state of the play-button right now. But I think this could be added relatively easily. I will talk with one of our student assistant who is already working on some updates for the library to add this feature in near future. 

Cheers
Dominik