Difference between revisions of "Sensorbox (Software)"

From P2P Food Lab
Jump to: navigation, search
Line 10: Line 10:
  
 
NOTES
 
NOTES
 +
 +
raspi-config
 +
 +
 +
sudo apt-get update
 +
sudo apt-get upgrade
 +
 +
Install DHCP server
 +
 +
 
  
 
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, ...
 
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, ...

Revision as of 17:27, 24 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

raspi-config


sudo apt-get update 
sudo apt-get upgrade

Install DHCP server


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

8. sudo apt-get install apache2 php




Web interface

Current version of the web interface:

Webinterface.jpg