Now with clicky buttons

A project log for Arduino PLC

Some code with Web Serial to enable full (manual) control of I/O pins on an Arduino via a webpage.

danteDante 03/18/2021 at 02:560 Comments

Hello again,

I've made the buttons corresponding to mutable states (input/output state, digital output state) clickable as toggles. Clicking one of the I/O state images causes that pin to switch (assuming it can be switched). Clicking one of the digital output images causes that pin to toggle its output state (or switch to outputting LOW if it's input mode).

I also made the GUI auto-refresh. There's an issue where sometimes the Arduino just stops outputting anything on serial, not sure what causes it but a reset is virtually instant and fixes it.