
HTML script to listen and send commands to Arduino via Serial Port
This is the source code for the web page interface to control your robot. For this to work you need the corresponding NodeJS script behind it. <html> <head> <title>Rasinro – Rasberry Internet Rover</title> </head> <body onmousemove=””> <h1>Rasinro – Raspberry Internet Rover</h1> <p>Status: <span id=”status”>Waiting…</span></p> <table border=’1′> <tr align=”center”><td><button id=’fl’ type=”button”>Forward…

NodeJS Script to listen and send command to Arduino Robot
var SerialPort,fs, http, io, server, net, serial, port; fs = require(‘fs’); http = require(‘http’); net = require(‘net’); var light1 = true; var light2 = true; SerialPort = require(‘serialport’).SerialPort; port = ‘/dev/ttyACM0’; server = http.createServer(function(req, res) { return fs.readFile(“” + __dirname + “/mobil2an.html”, function(err, data) { res.writeHead(200, { ‘Content-Type’: ‘text/html’ });…

Communicates with Arduino via Website with NodeJS
Install Node JS Install Node Serial Port: https://github.com/voodootikigod/node-serialport Install Coffee Script: npm install -g coffee-script Copy the following coffee script and compile it {SerialPort} = require(‘serialport’) fs = require ‘fs’ port = ‘/dev/ttyACM0’ serial = null value = 0x00 toggle = => value = if value == 0x00 then 0x01…

Raspberry Internet Rover Part 4 – NodeJS HTML Client
Now lets have a look on the remote control interface. Just copy and paste the HTML script below: <html> <head> <title>Rasinro – Rasberry Internet Rover</title> </head> <body onmousemove=””> <h1>Rasinro – Raspberry Internet Rover</h1> <!– <input type=”text” autofocus=”autofocus” /> <button type=”button” id=”publish”>publish</button> <button type=”button” id=”broadcast”>broadcast</button> <button type=”button” id=”whisper”>whisper</button> –> <p>Status: <span…

Raspberry Internet Rover Part 3 – NodeJS server
Install socket.io by typing: npm install socket.io Install zeparser: npm install zeparser , then copy paste this instruction below: var fs, http, io, server, net; fs = require(‘fs’); http = require(‘http’); net = require(‘net’); var light1 = true; var light2 = true; server = http.createServer(function(req, res) { return fs.readFile(“” +…