Some feature updates

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 12/21/2021 at 19:300 Comments

It's been a while but work has resumed on this project. First, the auto-refresh of the GUI is now toggleable. Second, the webpage has had a small internal change which is more for developer quality of life than anything else. Upon loading the page, the JavaScript side generates the grids of the UI on the spot. Previously a hard-coded list of 20 <img> tags was used, making any change to UI behavior take changing at least 20 lines in very similar ways.

Support for servo motors is partially complete. On the Arduino side, a new pin mode of 2 has been added corresponding to servo control mode. This mode can only be set on PWM pins. There is also a new SERVO command requesting the angle of any attached servo (pins not in servo mode report an angle of "?") and a SERVO= command setting the angle of attached servos (pins not in servo mode cannot be set and are ignored).

My next goal will be to support servo mode in the UI and allow graphical management of servo angles.