Serialport-server

SerialPort Server makes your Device (Arduino, mbed...) WebServer. You can access SerialPort via HTTP, WebSocket and TCP Socket.

Download as .zip Download as .tar.gz View on GitHub

INSTALL:

SYNOPSIS:

=> start HTTP, WebSocket, TCP Socket servers.

DEMO:

  1. Install Arduino Program
  2. Put LED(Digital 13), CdS(Analog 0) and 10kΩ
    LED
    CdS
  3. Run serialport-server
    % serialport-server /dev/tty.usb-device
  4. Open Ajax Demo
  5. Open WebSocket Demo

HTTP Interface:

read serialport write

WebSocket Interface:


// JavaScript
var ws = new WebSocket("ws://localhost:8784");
ws.onmessage = function(e){
  alert(e.data);
};
ws.send('hello!!');

TCP Socket Interface: