Difference between revisions of "Sensorbox (Software)"

From P2P Food Lab
Jump to: navigation, search
Line 6: Line 6:
 
* The images of the webcam are taken using [http://www.twam.info/linux/v4l2grab-grabbing-jpegs-from-v4l2-devices Tobias Müller's v4l2grab] application.
 
* The images of the webcam are taken using [http://www.twam.info/linux/v4l2grab-grabbing-jpegs-from-v4l2-devices Tobias Müller's v4l2grab] application.
  
 +
 +
== Configuring the Raspberry Pi ==
 +
 +
NOTES
 +
 +
1. Use one of the SD Cards with a Raspian image pre-installed. With the Raspberry Pi configuration tool: change the password (and memorise it), expand the file system, reduce the video memory to a minimum, turn off the automatic start of the desktop, enable SSH, ...
 +
 +
2. sudo apt-get install i2c-tools libi2c-dev
 +
 +
3. sudo adduser pi i2c
 +
 +
4. sudo nano /etc/modprobe.d/raspi-blacklist.conf, and comment out (= put # in front of the line) i2c-bcm2708
 +
 +
5. sudo nano /etc/modules, add i2c-dev and i2c-bcm2708 on a line each.
 +
 +
6. sudo modprobe i2c-bcm2708
 +
 +
7. sudo modprobe i2c-dev
 +
 +
 +
 +
 +
 +
 +
 +
== Web interface ==
  
 
Current version of the web interface:
 
Current version of the web interface:
  
 
[[File:webinterface.jpg|600px]]
 
[[File:webinterface.jpg|600px]]

Revision as of 16:26, 23 July 2013

The software for the sensorbox will be made available soon. Here are some details:

  • the I2C communication uses the Wire library on the Arduino and the plain Linux C API on the Raspberry Pi. Refs: Arduino's Wire library, Linux I2C API
  • The Web interface to configure the sensorbox uses Apache and PHP. There is a single configuration file that is stored in JSON format.
  • The images of the webcam are taken using Tobias Müller's v4l2grab application.


Configuring the Raspberry Pi

NOTES

1. Use one of the SD Cards with a Raspian image pre-installed. With the Raspberry Pi configuration tool: change the password (and memorise it), expand the file system, reduce the video memory to a minimum, turn off the automatic start of the desktop, enable SSH, ...

2. sudo apt-get install i2c-tools libi2c-dev

3. sudo adduser pi i2c

4. sudo nano /etc/modprobe.d/raspi-blacklist.conf, and comment out (= put # in front of the line) i2c-bcm2708

5. sudo nano /etc/modules, add i2c-dev and i2c-bcm2708 on a line each.

6. sudo modprobe i2c-bcm2708

7. sudo modprobe i2c-dev




Web interface

Current version of the web interface:

Webinterface.jpg