diff --git a/web/app.js b/web/app.js index 23e51e9..b8dfa69 100644 --- a/web/app.js +++ b/web/app.js @@ -170,4 +170,10 @@ class SerialPortHandler { } } -new Application(document.getElementById('app')); +const app = new Application(document.getElementById('app')); + +setInterval(async () => { + if (app.serialPortHandler.isOpened) { + await app.serialPortHandler.write('led_toggle' + '\n'); + } +}, 500);