Sensor Port 5 not in


Hi I’m just wondering if this is mistaken or something but the Python script for the Brick Pi doesn’t have anything to initialize to the fifth sensor port.

PORT_A = 0
PORT_B = 1
PORT_C = 2
PORT_D = 3

PORT_1 = 0
PORT_2 = 1
PORT_3 = 2
PORT_4 = 3

There’s no PORT_5 in the global variables and in the class for the BrickPi it’s just going up to index 3 (PORT 1 to 4)

There’s the fifth sensor port from the BrickPi’s Attaching LEGO section on


Hey Zewwo,
The fifth port is an I2C port. You can use it with any of the I2C sensors, and the I2C is controlled directly by the Raspberry Pi (which allows you to do much faster I2C communications).

We have an example of using Port 5 with a sensor in our BrickPi_Python library, called “”

It requires a different method for setup than you would using the other four sensors.