Unit A · On the network
What we are making: a control on the page. You tap it on your phone and something physical happens on the board, across the room.
So far the information goes one way: board to screen. Now it goes both ways. The phone asks for a different address, and the board treats that request as an instruction.
Two buttons. Each one is just a different address the board recognises.
silenced ? "SILENCED" : "ARMED" is a compact if. Read it as: if silenced, the first, otherwise the second.! means not. silenced = !silenced flips true to false and back.A page that changes a variable is not convincing. Wire a buzzer and let the alarm actually sound, so the button has a consequence you can hear from the corridor.
cm > 0 && before you trust the reading. A −1 is less than 10, so without that check a disconnected sensor sets off the alarm permanently.In this session