The first cut of code for the Internet button is now up and running. It’s really so far concentrated around 2 buttons and 3 response states :
Button 1 sends out a “button1” event to the Particle Cloud.
Button 3 sends out a “button3” event to the Particle Cloud.
And 3 response states.
State 0 is the “unknown state” set before the Internet button has been sent any state information. Also tied to the function “waiting_for_response” in the Particle Cloud.
State 1 – sets all Led’s to red. Tied to function “onccupied” in the buttons firmware – tied to the same name in the Particle Cloud.
State 2 – sets all Led’s to green. Tied to function “occupied” in the buttons firmware – tied to the same name in the Particle Cloud.
The Particle cloud advertises the 3 states tied to the specific Internet Button in our house.
This is the first step in understanding how to use the Internet button – and the first cut of the firmware. The buttons can now publish events to the Particle Cloud (which in turn can attache these events to other functions) and set states by calling functions in the buttons firmware from other software. (more about this later).
The good thing about the Internet Button is that it’s completely standalone, with the exception of a power source, currently seen as a USB plug in the pictures.