ELECINF344/381

Partie interactive du site pédagogique ELECINF344/ELECINF381 de Télécom ParisTech (occurrence 2011).

Catégories

[CASPER] Http setup interface

Today, we have been looking for the simplest way of giving a http control interface to our project. We found that the C library Microhttpd was matching our needs.

It’s a library which will allow us to create a very simple http server on the BeagleBoard. This way a user will be able to get registered into Casper’s « Database ». Eventually, through this interface, he will be able to give his name, a new Lua script or his various logins/passwords to access his mails and so on…

Besides, we made some changes in Casper’s prototype. We made a « box » in wood which contains the motors and supports Casper itself, so it’s easier to move it.

 

IRL is back

FPGA

Yesterday we were working on the switching on/off of the laser spot and on the module wich will ensure security. The features are written but not yet working well. We need modelsim to debug but it is only installed on the school’s computers which are, as you know, not available this week-end. So we decided to give up and focus on the Web part until Monday.

Web

Twitter

We can now fetch the last few tweets containing a given hashtag on twitter and put them into a database. Another program queries the database to get the newest message and then displays it letter by letter on the oscilloscope. Everything is written in C and working on the Armadeus board.
For twitter, we don’t use any library apart from libcurl, to query the twitter’s API, and jansson to parse the incoming JSON object returned by twitter.

Here a small video, you can see the latest (at this time) tweet on #rose2011, displayed leter by letter on the oscilloscope.
You can read « 75% students attendance during the vacation #rose2011″.

Interface:

We can pack the result from a query to the database into a JSON object. Inserting values given by a JSON object into the database won’t be difficult.
Next step is to communicate with a client. As we don’t seem to be able to make Mongrell2 work on the Armadeus, we looked for an alternative. Yesterday we have quickly tried a library called libmicrohttpd to handle HTTP queries. We have only tested a simple GET command, but at least it works on the Armadeus, and it is written in pure C. Contrary to CGI, this library is able to manage multiple connections in only one process using Posix threads.