I have been trying to send an array of numbers from the Particle Photon device to the Raspberry Pi. I was trying out the particle function, but it only seems to return an integer.
What are other alternatives?
I was thinking of using particle.variable where I can append all the integers in the array together separated by commas to create one giant string and then putting that into particle.variable. The raspberry pi could then call once a minute or so to get the particle.variable and decode the string array.
Where can I find an example of subscribing a pi to the particle cloud? I seem to only find examples of installing the particle agent onto the pi and controlling a led. But nothing much about subscribing a pi to the cloud.
When you install CLI on the RPi you can use the command I mentioned above.
You could also use the JavaScript SDK to subscribe to an event stream.
SSE is nothing specific to Particle but a common technique you can virtually use with any programming or script language.
So I see my pi printing out all the events. I guess that every time I want my Pi to subscribe to the cloud, I would need my python code to type into the terminal the particle subscribe command and then have a function in my code to subscribe to the event stream.