Simple Node.js application for piping serial communication from your arduino to a modern web browser with WebSockets.
See serial.js
for setting your serial port and needed baud rate
define(['child_process', 'serialport'], function(child, serialport) {
var serial = {
'connect': function(socket) {
board = new serialport.SerialPort('/dev/tty.usbmodem1a21', {
baudrate: 9600,
parser: serialport.parsers.readline("\n")
});
Install dependencies with npm install
, start the application with node app.js
and point your web browser to http://localhost:8099 to see your arduino's serial output…
Using Node.js, Express.js, Socket.IO, bootstrap by twitter and some more libs…