I need advice on setting up a web server on a Raspberry Pi that can communicate with the serial port.
Im leaning towards doing this i php/python/nodejs or c if necessary.
Requirements: 1. incoming data on serial port => update webpage through web sockets 2. some event on webpage => send data to serial port
A continuous loop to check for serial data will be heavy on the cpu. Is there any way to get an event on incoming serial data and then read it? Found https://github.com/voodootikigod/node-serialport that has an on data event. Is that a good option?
Can the serial communication be handled by the web server or will i have to create a service?