Dexter Industries BrickPi3¶
This page describes the drivers that are specific to Dexter Industries BrickPi3 These controllers are LEGO MINDSTORMS compatible addon boards for Raspberry Pi. Unlike the previous versions of BrickPi, the BrickPi3 uses the SPI interface on the Raspberry Pi to communicate.
You can confirm that the
brickpi3 module has loaded successfully by
dmesg. You should see something like this:
[ 3.053862] brickpi3 spi0.1: Mfg: Dexter Industries [ 3.060030] brickpi3 spi0.1: Board: BrickPi3 [ 3.063114] brickpi3 spi0.1: HW: 3.2.1 [ 3.076690] brickpi3 spi0.1: FW: 1.2.0 [ 3.090078] brickpi3 spi0.1: ID: FAD3CABB504B5354392E314BFF0F2C38
The BrickPi3 has four input ports, labeled S1, S2, S3 and S4. These ports are similar to the input ports on the EV3, but lack the ability to automatically detect sensors.
|Connection types||NXT/Analog, NXT/I2C, EV3/Analog, EV3/UART|
|Number of modes||6|
||LEGO NXT Color sensor|
|||The full port name includes the parent device
node. So, the |
|||No sensors are loaded by default. You
must manually specify the sensor that is connected and
its address by using the |
|||Only the LEGO EV3 Touch sensor is
supported. The |
|||Only the LEGO EV3 Ultrasonic, Color,
Gyro, and Infrared sensors are supported. They cannot be
automatically detected, so you must specify the sensor
manually using the |
brickpi3 modules creates one I2C adapter for each input port. These
are available at
X is the number of the input port
plus 2. The adapters can only be used when the port is set to
mode. Only SMBUS messages are supported and are limited to 16 bytes.
The BrickPi3 has four output ports, labeled M1, M2, M3 and M4, for driving
motors or other devices. The ports are similar to the output ports on the
EV3, except that they cannot automatically detect when a motor is connected.
By default, the
lego-nxt-motor driver is loaded, so you don’t need to
manually set the mode or device unless you want to use something else.
Not all tacho-motor Subsystem features are supported.
stateattribute will never return the
stateattribute will only return the
overloadedflag with firmware >= v1.4.3.
stateattribtue does not support
|Connection types||tacho-motor, dc-motor, led|
|Number of modes||3|
||NXT/EV3 Large Motor|
||RCX/Power Functions motor|
||RCX/Power Functions LED|
The BrickPi3 has one user-controllable LED. It is turned on by default when
brickpi3 module is loaded. It uses the mainline kernel LEDs class
subsystem. You can find it in sysfs at
<N> is the address of the BrickPi3 (it will be
1 if you only
have one BrickPi3).
- This driver is used to get information about the BrickPi battery.
- It uses the power_supply subsytem.
- It registers a sysfs device node at
||Returns the battery voltage in microvolts.|
The BrickPi3 monitors four different voltages for the on-board regulators (these are coming from the BrickPi3 itself, not the Raspberry Pi). There is one for 3.3V, one for 5V, one for 9V and one for direct battery voltage.
These voltages are read using the mainline kernel Industrial I/O driver.
You can read the values at
N is one of
You can use the Battery driver for monitoring the battery instead of using this driver.