{{:public_namespace:grove.jpg?150|}}{{:public_namespace:raspberrypi.png?80|}} ====== 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. * [[http://www.dexterindustries.com/GrovePi/get-started-with-the-grovepi/setting-software/|Setup software for Groove Pi]] * [[http://www.dexterindustries.com/GrovePi/get-started-with-the-grovepi/updating-firmware/|Setup firmware for Groove Pi]] (only do that to upgrade the GroovePi firware to the last release) When every software part is installed, you have to patch the wiringPi library in order to be able to use it with WComp. You just have to download the following zip file, extract it and and launch the installer to patch and install a patch wiringPi library on your Raspberry Pi. * Download {{:telechargement:wiringpi_patch.zip|}} unzip wiringpi_patch.zip cd WiringPi\ Patch chmod +x install.sh sudo ./install.sh ===== Give access to GrovePi for a regular user ===== 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 sudo mono ContainerMonoLinux.exe -r Beans -l pathToGroveSensorFile.wcc ... 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: ACTION=="add", KERNEL=="i2c-[0-9]*", MODE="0660", GROUP="i2c" As you added a new rule, you have to restart the udev service. sudo service udev restart 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). sudo adduser pi i2c sudo adduser pi dialout ; # access Broadcom UART via /dev/ttyAMA0 After adding group and user to group, you have to logout and login again to have the right permissions ti these files. To be continued