Tuesday 27 August 2013

weatherstation code merged

As part of adding support for using the BeagleBone Weather Cape in Minix, I ported the weatherstation application. The task mostly involved removing the node.js and socket.io code and replacing it with a JSON interface. I also added a loading spinner using spin.js and changed the units of pressure from mbar to hPa. Lastly, I updated to the latest versions of jQuery and Processing.js.

Since Minix doesn't have a web server in the base system, I developed a tiny web server in Lua that implements just enough to serve the static content and generate JSON. I'm elated that this project affords me the opportunity to work at all layers of the software stack, from device drivers to web servers to HTML5 and javascript.

Yesterday, I recorded a video demo of the application in action. The code was also merged into the Minix base system yesterday. Here's the commit. To use the weatherstation app, you just have to plug the board into a network (doesn't have to be Internet connected), configure the NIC with `netconf`, attach the cape, and boot the system. The cape will be automatically detected, the right drivers will be loaded, and the web server will be started. In the coming days I will be writing more formal setup instructions on the Minix wiki.

No comments:

Post a Comment