You can try the visualization on your own PC by clicking on this link:
-
http://d1t2tbzmskak12.cloudfront.net...ion/index.html

To view the client source code, just click "View source" on the web page.
The web page will try to connect to the excavator using the local IP address 192.168.0.107:8001. If it isn't able to connect, it will just play some random movements. Only computers on my network will be able to connect to my excavator, so you all will see the random movements.
On the excavator (the server in this case) I run these few lines to broadcast the positions to all clients that connect:
Code:
var ws = require("nodejs-websocket")
var server = ws.createServer().listen(8001);
setInterval(function() {
server.connections.forEach(function (conn) {
conn.sendText(JSON.stringify({bucket: state.bucket.pos, stick: state.stick.pos }));
})
}, 40);
That's all there is to it!
Best regards,
Stein :-)