I have a project in unity for WebGl, but I need to connect to an arduino by serial port,
Hi, I have a project in unity for WebGl, but I need to connect to an arduino by serial port, the application does not detect the port to connect to the arduino, can you help me?
Hi did you find an answer? I do believe work-around however it has got to do with Websockets and is a lot more clucky that anyone would prefer.
Answer by janoonk · Nov 11, 2020 at 10:49 AM
You could make a seperate application running locally and using a websocket connection from the webpage to this application. The application connects to the arduino through serialport and acts like the middleman between the webpage and arduino. The application has a socketserver which listens to incoming websocket connection request from the webpage. The application reads the arduino data through the serialport connection and sends it through the websocket connection to the webpage.