martedì 8 marzo 2011

WiFi sensors - accelerometer SPI/I2C

With OpenPicus it is very easy to build wireless sensors; in this example we are working with an 3 axes accelerometer by ST (LIS3LV02DL) connetted to FlyPort through SPI.
The idea of measure vibrations was started with my friend Massimo for the thesis of his student Andrea, in which he measured vibrations by using a LIS3LV02DL connected to an Ethernet modules running ContikiOS.This is an evolution of that project, where the ethernet connection is replaced by WiFi and collection of data is entirely web-based:


For firmware development I used OpenPicusIDE rev1.0. Steps were:
- create a new project
- copy accelerometer library on ExternalLib directory
- write code in FlyportTask()
- modify webpages and import to the project (Thanks to Andrea Mazza for his help with Flot ;-)
- write code to manage web pages request (es. HTTPPrint_acc)
- build all and download firmware
the result should be:


If you are interested, you can download code:
hg clone https://serra82@bitbucket.org/serra82/flyport_surveillance_ide1.0

Nessun commento:

Posta un commento