diff --git a/Dashboard/src/App.tsx b/Dashboard/src/App.tsx index 28cef00..416772f 100644 --- a/Dashboard/src/App.tsx +++ b/Dashboard/src/App.tsx @@ -20,20 +20,24 @@ const App = () => { baudRate: 9600, autoOpen: false, }); - const handler = () => { - // eslint-disable-next-line - port.write("off", (err) => { - if (err) { - return console.log("Error on write: ", err.message); - } - console.log("message written"); - }); + const sendIncreaseHandler = () => { + port.write("2i"); + }; + const sendDecreaseHandler = () => { + port.write("2d"); + }; + const sendToggleHandler = () => { + port.write("2t"); }; return (
- { console.log("inc"); }} decrease={() => { console.log("dec"); }} toggle={() => { console.log("togg"); }} /> + -