Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How It Works
The original version of the control and telemetry code for Lollybot grew out of code I had written for various projects that used hacked joysticks. The code was written in Object Pascal using Delphi. Unfortunately, there are currently no free versions of Delphi available (although Lazarus is a possible alternative) so students wanting to build or modify the code for themselves would have to pay for a development environment. In addition this code will only run on Windows machines.
Both Node.js and the web-browser can be run on the same machine but it is also possible to connect to a Node.js server running on another machine over a network (via the "Settings" panel on the Lollybot software). Node.js is available for Windows, Linux, and Mac OS and the web-interface will run in any modern HTML5 compliant browser so this provides an environment for Lollybot that is cross-platform, free, and the client can be running across a network. See the image below.
The Node.js server code is in the file 'lollybot-server.js'. In addition to node-hid and Socket.io, it also relies on another plug-in called Commander.js which is used to read command-line options for the server.
- [lollybot-control.js](https://github.com/Tominator2/lollybot/blob/master/%20lollybot/scripts/lollybot-control.js) in the '[scripts/](https://github.com/Tominator2/lollybot/tree/master/%20lollybot/scripts)' directory, and
- [lollybot.css](https://github.com/Tominator2/lollybot/blob/master/%20lollybot/css/lollybot.css) in the '[css/](https://github.com/Tominator2/lollybot/tree/master/%20lollybot/css)' directory'
- the jQuery.Sparklines plugin which is used to draw the analog joystick graphs, and
- the client-side code for Socket.IO.