The SSP serial interface is very simple to utilize on Linux computers, such as a Raspberry Pi. The Raspberry Pi is a simple Linux computer based on a Broadcom BCM2835 SoC and is intended for students, hobbyist and hackers. The SSP-x is a serial port interface to a 16g sensor. We use a Python script to access multiple SSP units and stream the data to a single file.
We installed Python and mail utilities to the Pi by typing the following into a terminal window:
sudo apt-get update sudo apt-get install ssmtp sudo apt-get install python-dev sudo apt-get install python-serial sudo apt-get install python -pip
The Python script is available here. Uncompress the zip file and copy the files to the Pi.
The script is easily configured using the config.txt file placed in the ./ local directory. The order of things in the configuration script do matter. An explanation of each configuration settings and the order they should be in is explained below.
This script could be used as a cron job to capture a sample whenever the task is activated. It is recommended to set the sleeptime to 0 if the script will be used in a cron job.
The Pi runs continously and logs data until the loop count has been reached. It is possible to set the pi to run the script to capture 10 samples every minute, if the script is set as a cron job.