Dear, I am developing a research project for a University, which involves the use of a mobile application and the Photon device of the Particle, I have a doubt regarding the connection that this device has, I managed to use Google services, however, my project requires the transfer of 5 readings of an accelerometer every 1 second, so making the connection through the particle cloud delays this transfer rate a bit. Is it possible to not use this connection and directly connect the Photon device to my mobile application and get the accelerometer reading?
Very grateful, I await your response.
You can use
UDPto “directly” talk to any IP your device can reach.
On the other hand, if you could wrap the five readings into one event, you might still be able to use
If your application can tolerate the very occasional lost transmission, start with UDP. I’m not sure if you’re just getting a device orientation or integrating reading to develop position/trajectory information, which would make data loss more impactful and push you to TCP.
Hi, thank you for you answer.
Can I use ‘Particle.publish ()’ even though there are 5 readings per second? I am working with a 3-axis accelerometer, where the reading I need to register is more or less like this:
X , Y , Z , TIME
0.11328125 , 0.23828125 , 0.96484375 , 2017-11-23 12:30:27
0.08984375 , 0.1484375 , 0.9921875 , 2017-11-23 12:30:27
0.13671875 , 0.1875 , 0.96875 , 2017-11-23 12:30:27
0.15625 , 0.20703125 , 0.96484375 , 2017-11-23 12:30:27
0.12890625 , 0.2421875 , 0.95703125 , 2017-11-23 12:30:27
0.14453125 , 0.19921875 , 0.9609375 , 2017-11-23 12:30:27
Is it possible to get that transfer rate or better with a connection from Photon and Android Mobile Application?
Basically I gather this information to build ‘csv’ files and use them later.
This was already answered in my first post