raspberry-grove

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
raspberry-grove [2015/03/25 18:08]
Stéphane Lavirotte created
raspberry-grove [2015/03/26 11:46] (current)
Stéphane Lavirotte
Line 1: Line 1:
 +{{:​public_namespace:​grove.jpg?​150|}}{{:​public_namespace:​raspberrypi.png?​80|}}
 ====== Install Groove Pi on Raspberry Pi ====== ====== Install Groove Pi on Raspberry Pi ======
 +
 +{{:​public_namespace:​grovepi.jpg?​200|}} {{:​public_namespace:​grove_sensors.jpg?​600|}}
 +
 +===== Install native libraries =====
  
 To be able to use Groove sensors and actuators, you will have to install some extra software. You can read the following procedure to setup the software to use Groove Pi on Raspberry Pi. To be able to use Groove sensors and actuators, you will have to install some extra software. You can read the following procedure to setup the software to use Groove Pi on Raspberry Pi.
Line 15: Line 20:
 sudo ./​install.sh sudo ./​install.sh
 </​code>​ </​code>​
 +
 +===== Give access to GrovePi for a regular user =====
 +
 +<note warning>​At the moment, with the current implementation,​ you will have to be root when you execute WComp in order to be able to access gpio. We currently using the wiringPiSetup function which needs to be called as root user. We are working on a different solution to avoid this problem using wiringPiSetupSys and gpio program.
 +
 +So, when you use Grove sensors, you will need to lauch WComp container, with sudo
 +<​code>​
 +sudo mono ContainerMonoLinux.exe -r Beans -l pathToGroveSensorFile.wcc ...
 +</​code>​
 +</​note>​
 +
 +You have to give access to a regular user to GrovePi to avoid to use ''​sudo''​ to your program when you want to access GrovePi.
 +Raspberry uses Serial, SPI and I2C to communicate with GrovePi. So you need to give access for a regular user to all these buses.
 +
 +{{:​public_namespace:​grovepi_soft_architecture.jpg?​450|}}
 +
 +Create a file in ''/​etc/​udev/​rules.d''​ with the suffix ''​.rules'',​ e.g. ''​local.rules'',​ and add a line like this to it: 
 +<​code>​
 +ACTION=="​add",​ KERNEL=="​i2c-[0-9]*",​ MODE="​0660",​ GROUP="​i2c"​
 +</​code>​
 +
 +As you added a new rule, you have to restart the udev service.
 +<​code>​
 +sudo service udev restart
 +</​code>​
 +
 +This will now create the right file in /dev with permission of ''​rw''​ for owner (root) and for group ''​i2c''​. The last step is to add your user to the ''​i2c''​ group but also to other communication buses used: serial. (At the moment, don't have any information about the use of SPI by GrovePi).
 +<​code>​
 +sudo adduser pi i2c
 +sudo adduser pi dialout ; # access Broadcom UART via /​dev/​ttyAMA0
 +</​code>​
 +
 +After adding group and user to group, you have to logout and login again to have the right permissions ti these files.
 +
 +<note important>​To be continued</​note>​
 +
  • raspberry-grove.1427303316.txt.gz
  • Last modified: 2015/03/25 18:08
  • by Stéphane Lavirotte