Banana Pi first tests

Sunday 17 August 2014

Banana Pi

A few weeks ago I ordered a Banana Pi board from http://www.pidirect.org/products/banana-pi-0 who appear to be based in Ireland. The board arrived a couple of weeks later and after initially trying it with one of the test images from the lemaker.org site I couldn’t get it to boot so it went back on the shelf again!

Banana Pi

Tonight I tried with a new Raspbian image from http://www.lemaker.org/resources/9-38/image_files.html and the Banana Pi booted and had a SSH console running on the network.

After updating the operating system I setup I2C using the guide on https://www.abelectronics.co.uk/i2c-raspbian-wheezy/info.aspx and after a reboot I2C was running on the device.

I tried one of our ADC boards on the Banana Pi and downloaded the Python scripts from https://github.com/abelectronicsuk/ABElectronics_Python_Libraries/

Banana Pi

The script wouldn’t initially run and after some investigation I found that the Banana Pi has five I2C ports compared to the Raspberry Pi’s two I2C ports.

Running: ls -l /dev/i2c* which gave a list of the available I2C devices.

Next I ran sudo i2cdetect –y 0 then 1, 2, 3, 4 to view the connected I2C devices.

The Delta Sigma Pi (https://www.abelectronics.co.uk/products/3/Raspberry-Pi/14/Delta-Sigma-Pi) appeared on I2C bus 2 as 0x68 and 0x69.

Banana Pi

I needed to modify the I2C bus detection section of the Python code, removing the code below and replacing with: i2c_bus = 2

The python script then ran without any problems and I was able to read the analogue inputs from the AB Electronics UK boards.

Banana Pi

Next I tried connecting the Serial Pi board (https://www.abelectronics.co.uk/products/3/Raspberry-Pi/29/Serial-Pi) to try to access the Banana Pi via a serial uart console.

The Banana Pi didn’t appear as expected and after checking the pin configuration online I found that the Banana Pi’s default UART port is not on the main GPIO header and is on a smaller J11 header which only has TX and RX connections.

After wiring the Serial Pi board using jumper leads and powering on the Banana Pi the boot console appeared on the Putty serial screen on the host PC and I was able to login to the OS and use it remotely.

Banana Pi

The screen shot below shows the response to a shutdown command.

Banana Pi