Setting Up The Software

Setting Up The Software

Below are directions on how to setup your Raspberry Pi software to work with the GrovePi+.  If you’re new to the Raspberry Pi, we recommend you use a Dexter Industries SD Card which comes will all software pre-configured for your GrovePi.

The first step with your new GrovePi+ is to configure the Raspberry Pi.  The GrovePi+ will not work correctly with the default setup.  This is a step-by-step guide to getting the Grove Pi communicating with the Raspberry Pi.  Before beginning this installation, make sure your Raspberry Pi is connected to the internet.

1.  Power on the Raspberry Pi,  without the GrovePi attached, and open a terminal (we’ll be doing it on SSH, but the directions are the same when using the terminal on a standard Raspberry Pi setup with a monitor).

0 on

2.  Change directories the Desktop.  We recommend installing the GrovePi software on the Raspberry Pi Desktop.    Clone the GrovePi git repository by using the command:

cd /home/pi/Desktop
sudo git clone https://github.com/DexterInd/GrovePi

GrovePi Git Pull to setup directory

When we’re done downloading, there should be a new folder on the Desktop called “GrovePi“.

3.  Go to the Scripts folder in the GrovePi folder.

cd /home/pi/Desktop/GrovePi/Script

Change directory to the scripts.
4.  Make the install.sh bash script executable.  We do this by modifying the permissions of the script:

sudo chmod +x install.sh

4-Make_install_executable
Note in the screenshot above, we ran the command

ls -l

and the install.sh file has turned to green. This means it was successfully changed to executable

5.  Start the script.  You must be the root user, so be sure to include “sudo”!

sudo ./install.sh

5-Run_install

 Press “Enter” to start when you are prompted.

6.  The script will download packages which are used by the GrovePi+. Press “y” when the terminal prompts and asks for permission to start the download.

6-Click_Y_to_install

In the above example, press “y” and then press enter.  You may need to do this multiple times during installation.

7.  The Raspberry Pi will automatically restart when the installation is complete.

7-reboot_at_end_of_install

You can stop the reboot process by pressing ctrl+c at any point.  However, you must reboot for the update and installation to take effect.

8.  Now when the Raspberry pi is powered down, stack the Grove Pi on top of the Raspberry Pi.  Ensure that the pins are properly connected before powering the Raspberry Pi.  

GrovePi+_and_RaspberryPi+ (3)_Small

Power on the Raspberry Pi.  A green light should power up on the GrovePi+.  

 9.  Now to check that the script was correctly installed.  We will check that the Raspberry Pi is able to detect the Grove pi: run i2cdetect

sudo i2cdetect -y 1

Note: if you have an Original Raspberry Pi (Sold before October 2012) – the I2C is port 0:

sudo i2cdetect -y 0

9-test_i2c_on_grovePi

If you can see a “04” in the output, this means the Raspberry Pi is able to detect the GrovePi.

10.  To test the Grove Pi, connect a Grove LED to port D4 and run the blink example.

In the terminal type:

cd /home/pi/Desktop/GrovePi/Software/Python
sudo python grove_led_blink.py

Test LED Blink on GrovePi

 

If everything is installed correctly and the LED is on the port labeled D4, the LED should start blinking.

Blinking GrovePi LED on D4

Questions?

Have a question or a problem?  Post it on the forums and we’ll help you out.