Particle's Raspberry Pi (beta) development scheme.
Having the Photon imitate the Arduino sketch structure (setup(), loop()) made sense. But the Raspberry
Pi is not that kind of animal. Or rather, Linux is not that kind of OS.
- The "sketch" model leads to running particle-agent as
super-user since generally access to GPIO pins require SU. However, I
can imagine using Particle's cloud services without any reference to
GPIO in the RPi at all. E.g., collecting data from Photons and passing
- When I DO read sensors or write to GPIO to switch things
I tend to split device access up into separate programs that provide
info when I ask (through the several inter-processor communication
methods). Or I use crontab to schedule things. If I need to turn
something on at 6pm and off at 7am with a Photon I have to do it in a
sketch loop() but I'd never do that with a RPi. There are better ways.
These "programs" may have to run as SU briefly but the main Particle
cloud communicator need not. And should not.