SpanglefishDMS Consulting | sitemap | log in

Raspberry Pi Software and Hardware Installation


You will need a Raspberry Pi running Raspbian. Jessie is the latest and has the advantage of already having Java installed. You will need to enable I2C during setup.
Also useful is i2c_detect that shows an array of I2C addresses available. Download and install i2c-tools.

Download Java

If you are using a version of Raspbian that does not have Java on it you will need to download a version of Java 8 and install it.

Java Downloads

Download Linux ARM 32 Hard Float ABI
To install on the Pi you will need to be root. The pre-installed Java is found in /usr/bin/ . CD into /usr/bin/ and enter tar -tvzf jdk-xxxxxx-tar.gz

To test enter - java -fullversion

Download Software

Next you need to download the I2C-Raspberry.tar.gz software from


Copy it to the Pi and unpack it -
tar -xvzf I2C-Raspberry.tar.gz
This should create a directory called I2C-Raspberry. This directory should contain everything you need to run I2C on the Pi.

I2C with the Pi

There are several ways of attaching an I2C bus to the Pi. I have used the I2C available on the Pi and I have attached the UMFT4222EV USB dongle. The Pi hardware does not implement Clock Stretching but otherwise works fine. For more complicated I2C bus structures use the UMFT4222EV

Using the Pi I2C

The Pi has a built-in I2C. There are several problems with the implementation but it can be made to work. For simple tests, the 5V supply on the Pi can be used. When the circuit gets more complicated or if motors are used, an external 5V supply may be needed. Be very careful wiring up directly to the Pi. Check your connections and don't have loose wires floating about.


Simple I2C Circuit

Some experience is required to build these circuits. A real beginner should start with one of the excellent online tutorials on basic electronics.

I2C circuits are best developed first on a breadboard. Start with two or three breadboads and a collection of connecting wires of different lengths and colours. You will also need some components - resistors and leds. Lastly you need some I2C chips. I find the MCP23017 very useful - get several. Download the data sheet for the MCP23017 to get the pin connections. All these are available on the Internet very cheaply.

I2C breadboard circuit.

Test Simple Circuit

There are two simple Java tests for the Simple I2C Circuit -
i2c_tests.I2CMCP23017Test1 and i2c_tests.I2CMCP23017Test2
Open a Comand Prompt Window and CD into the I2C-Windows folder
Enter -
.\Java-32.bat i2c_tests.I2CMCP23017Test1
.\Java-32.bat i2c_tests.I2CMCP23017Test2

WikanikoWork from Home