RPi Software Installation

The devices on this site all have supporting PRi software written mostly in Python. This is released under the GNU public licence.

Installation

The following instructions are for the RPi but may well work for other Unix systems. In a nutshell this is what to do:

*** Note install both serial and I2C as they are both referenced in the classes ***

Serial:
sudo nano /boot/cmdline.txt #remove console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 <1>
sudo nano /etc/inittab #comment out #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 <3>

SWS Software:

mkdir sws

cd sws

Download the sws zip file into the sws directory (you can use wget for this)

sudo unzip sws_1_0.zip (the file name may be different for different versions)

I2C:
sudo apt-get install python-dev
sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev <2>
sudo apt-get install i2c-tools
sudo nano /etc/modprobe.d/raspi-blacklist.conf *  #comment out the i2c line <4>
sudo nano /etc/modules                                    #add line i2c-dev <5>
sudo adduser pi i2c
Now install notSMB in this link
 
* The raspi-config tool does not complete all of these tasks!!.
 
This is explained in more detail below.

Serial

The PRi is not set up for serial communication out of the box as the port is used for the console.

sudo nano /boot/cmdline.txt

remove the following text: console=ttyAMA0,115200 kgdboc=ttyAMA0,115200

Save and exit ctrl-o <enter> crtl-x

sudo nano /etc/inittab

comment out the this text: #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

Save and exit ctrl-o <enter> crtl-x

It may be necessary to join the communication group, sudo usermod -a -G dialout pi (will need reboot to take effect)

sudo reboot

A reboot is needed for these to take affect, there is another way to reload this information but I can't remember what it is. You may want to defer this as if installing I2C then that also requires a reboot.

Python

Optionally update first sudo apt-get update

sudo apt-get install python-wxgtk2.8
sudo apt-get install python-serial

mkdir sws

cd sws

Download the sws zip file into the sws directory (you can use wget for this)

sudo unzip sws_1_0.zip (the file name may be different for different versions)

The program is run from this directory python sws.py

The serial interface will now work. Don't worry about the COM port not being found this is normal:

Simply type /dev/ttyAMA0 into the dropdown

I2C installation

* This can also now be done by the sudo  raspi-config tool.

Once again the RPi is not set up for I2C so there needs to be a few changes

sudo nano /etc/modprobe.d/raspi-blacklist.conf *

This may be an empty file on later version so just leave it empty

Comment out the items as shown above.

Save and exit ctrl-o <enter> crtl-x

sudo nano /etc/modules

Save and exit ctrl-o <enter> crtl-x


sudo apt-get install i2c-tools

sudo adduser pi i2c

sudo reboot  (required for this to take affect)

sudo apt-get install python-dev   (takes quite a while)

mkdir notsmb

Download the notsmb_1_0.zip file into that directory (file name may be different)

unzip notsmb_1_0.zip

sudo python setup.py install

There will be a few errors shown but it should be okay.