Hi,
I am using a Particle Core to display uptime, temperature and LED status on web page. I am accessing the Spark data using Python and the Flask web framework; it works well. Generally, it takes around 2 seconds to display the page which I think is due to the three spark variable calls on page load.
In contrast, I wrote another version of the app that does the exact same thing using a Raspberry Pi and Arduino Leonardo with the communication between the two over USB/serial. The code is very similar in both cases, but this unit loads pages about 2x as fast. One of the big differences is that I send more information in this model (this sensor also provides humidity) and transmit it in comma delimited format which Python decodes.
All of this brings me to my question, would it be significantly faster to pass the data in the first approach in a single comma delimited Spark variable and then decode it in Python versus making three separate calls? I am guessing that it might but am not sure. Has anyone actually tested and compared these two approaches? (I will eventually test this, but my current Core is being used and so I will have to test it on one of my Photons when they arrive.)
Thank you in advance!
JL