
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(“” +…

Raspberry Internet Rover Part 2 – Python Datagram Server Codes
Some python code in the Raspberry Pi is needed to send commands. Install socketIO_Client for your python from : http://www.gelens.org/code/gevent-websocket/ Then please save this file in your Raspberry and run it. # # Datagram socket server class – derives from sserver # import socket import serial import sserver from socketIO_client…

Controlling Arduino Motors via Raspberry-Hosted Website (Part 2)
We want to send commands to our remote-control Arduino car. One way to communicate directly with Arduino from Python is through Serial interface. For this we need a Python library called pySerial, which allows direct signal manipulation via serial ports. Installation PySerial is available as a standard Debian package. sudo apt-get install python-serial…