Hello all! I’m trying to make a new webapp for my particle core (it’s old, I also have a photon).
The concept is simple: have a publicly (or multi-user) webpage where banks of LED matrices can be controlled.
I’m still working on the frontend interface, but I’ve wired up my LED PWM controller and LEDs, and I can control via the particle console.
The variables I need to control are: Matrix to select, x coordinate, y coordinate, and brightness. All are datatype int (of varying length, the matrix selector is uint8, the matrix coords at uint16, and the brightness is uint8).
I used the beginner’s guide for a basic HTML page to control these variables: works!
I found on the forums a few neat examples for controlling hardware via web, but, being wary of having my API token in plaintext HTML, I starting using the PHP proxy by wgbartely found here.
Options I’m considering, but need help deciding on:
1.) Continue on with JS commands to Particle.functions, with the PHP proxy.
2.) Have my webserver call a Particle.function() that generates a webhook which requests the data (not very RESTful for the webserver - what if the state of the 4 variables is changed before the webhook request comes in?)
3.) Use the Particle JS API somehow (I really haven’t investigate this option - need advice!)
There’s so many great posts and code examples on this forum, so any comment on strategy is great.