Revision as of 01:44, 19 February 2012

Contents

Executive Summary

Our project aims to implement the emerging nodejs technique (the server side javascript) as a lightweight web server on the beagleboard and accomplish a series of remote monitoring and control of hardware pins like gpio/led/i2c on the beagleboard. There are a lot of things we can do on the nodejs web server, but we try to make it related to our beagleboard hardware interface.

Give two sentences telling what isn't working.

End with a two sentence conclusion.

The sentence count is approximate and only to give an idea of the expected length.

Highlights

Theory of Operation

Give a high level overview of the structure of your software. Are you using GStreamer? Show a diagram of the pipeline. Are you running multiple tasks? Show what they do and how they interact.

To build a web server, we need, in essence, both client side and server side scripts. Client side scripts mainly just involve ordinary javascripts that can be embedded in HTML file; while at the server-side, we adopt the emerging node.js, which is a really simple server side script that accomplishes equivalent tasks like ASP, PHP will do, but with even simpler implementation details.

2. Even though we can access to the gpio in the above way, we still need to find someway to access the I2C information. In the I2C exercises, from the C code provided in exercise 5, we can think of the following two options:

a) To translate tons of the C codes into JavaScript...including rewriting the union structures like i2c_smbus_write_byte() and i2c_smbus_read_byte(), which requires far more knowledge in understanding how to translate the underlying hardware detail into upper-level script languages...

4. The next thing we will do is to refresh the website every other time...

We are now able to load html file inside nodejs scripts so that we can put normal HTML stuff inside the web page and load it from server scripts. The following code snippet can accomplish this (borrowed and modified based on Jadon's code):

Now we can update the temperature information on the website, both triggered by a button on the page, and by just automatically refreshing the temperature value whenever the temperature changes. Here is the simple client script for accomplishing this: