sbstjn / node-arduino-socket

Simple node.js application for piping a serial connection over websockets to your browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple Node.js application for piping serial communication from your arduino to a modern web browser with WebSockets.

arduino-socket

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…

About

Simple node.js application for piping a serial connection over websockets to your browser

License:MIT License


Languages

Language:JavaScript 100.0%