Setting up Your Raspberry Pi

Enable SPI on your Raspberry Pi

First of all, make sure you have downloaded the very latest version of Raspian from the RaspberryPi.org.  The latest versions not only support the newest hardware but have also simplified the use of Python with GPIO pins. In addition, your Raspberry Pi will boot straight into the graphics-user-interface (GUI) with these newer versions making it easy to set things up.

The following steps assume your Raspberry Pi is on, that you are connected to the internet, and that you have booted to the startup screen. If so, click on the menu button on the upper left and then on the Preferences tab below that. After another submenu pops out to the right, click on the area where it says Raspberry Pi Configuration:

After that, the Raspberry Pi Configuration window will pop up with some tabs across the top. Click on the Interfaces tab and then locate the line that says SPI. Click the button to the left of the work Enable. We also use SSH and VNC quite a bit in our lab so now would be a good time to enable those as well:

Click on the OK button. You may be prompted to reboot your Raspberry Pi. If so, just click the Yes button. After your RPi has rebooted and the desktop is on the screen again, you will be ready for the next step.

 

Downloading the Pi-Plates Python Modules

Start by clicking on the icon shown in the image below to open a terminal window :

A terminal window will then pop up in the middle of your screen presenting you with a command line interface (CLI):

Install the Pi-Plates python modules by typing: sudo pip install pi-plates and hitting <ENTER>

For Python3, type: sudo pip3 install pi-plates and hit <ENTER>

If all goes well, you should see the following on your terminal:

Setup6

Congratulations, you're ready to talk to your Pi-Plates using Python!


Attaching Your Pi-Plate to the RPI

If you have purchased a CASEplate, go here for assembly instructions.

Otherwise, it should be pretty straight forward to plug your Pi-Plate onto your Raspberry Pi board. Before doing so, however, inspect the header pins on your Raspberry Pi and ensure that they are straight. Once that is done, simply align the Pi-Plate over the Raspberry Pi and push them together. Try to keep the assembly square and you should be good to go.

If you have additional Pi-Plates, repeat the above steps using the included 15mm standoffs to act as spacers between the boards.


Setting the Address of Your Pi-Plate

All Pi-Plates include a header populated with some jumpers for selecting the address of the board. When shipped, each board is preset to address 0. If you want to use a different address, move the jumpers according to the diagram below:

AddressHeaders

Note that the address is only read during power up. If you want to change your Pi-Plate address, you will have to power down it down, move the jumpers to select your address, and then power back up.


Raspberry Pi Pins used by Pi-Plates

The following pins are used by Pi-Plate boards:

  • The following pins are dedicated to Pi-Plates and cannot be shared:
    • Pin 22 / GPIO 25
    • Pin 26 / GPIO 7
    • Pin 16 / GPIO 23
    • Pin 15 / GPIO 22
  • The following pins are used for SPI communication and can be used by other SPI-enabled devices selected by CE0. They cannot be used for GPIO:
    • Pin 19 / GPIO 10
    • Pin 21 / GPIO 9
    • Pin 23 / GPIO 11
  • The following pin may be used by Pi-Plates if their features are enabled:
    • Pin 12 / GPIO 18
  • The following pins are reserved for future expansion:
    • Pin 16 / GPIO 23
    • Pin 18 / GPIO 24
  • Pi-Plates do not use any of the GPIO signals located on pins 27 through 40.
  • The DAQCplate and DAQC2plate boards can be powered by the RPi or can provide power to the RPi along with the rest of the stack. See the documentation for each board to learn ore.
  • Pi-Plates use a very small amount of the 3.3V power for pull ups and driving a single level translator.

Using node-RED

Pi-Plates can also be controlled with node-RED using 3rd party code that is managed by Mike Harsch. These various modules along with the installation instructions can be found HERE at github. Please direct questions about these modules directly to Mike.