File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ title : Dexter Industries BrickPi Input Port 5
3+ ---
4+
5+ Input Port 5 on the BrickPi is physically wired to the I2C pins on the Raspberry Pi
6+ and I2C is supported by i2c_bcm2708 kernel module. Port 5 is not present in BrickPi+.
7+
8+ Only ` I2C/NXT ` and ` I2C/Other ` sensors work on port 5. See ` Connection ` column
9+ in [ supported-sensors] to determine if particular sensor will work.
10+
11+ ## Using Sensors
12+
13+ For detailed I2C information see [ using-i2c-sensors] .
14+
15+ For Input Port 5 you have to make sure that correct baudrate for the sensor is set
16+ and load the driver manually. I2C/NXT sensors should work with slow 9600 baudrate
17+ used originally in Mindstorms NXT.
18+
19+ {% include icon.html type="warning" %}
20+ Some devices behave erratically if baudrate is changed while they are plugged in.
21+ If needed unplug your sensor, change the baudrate and plug the sensor again.
22+ {: .alert .alert-warning}
23+
24+ Example: Setting RaspberryPi I2C baudrate:
25+
26+ modprobe -r i2c_bcm2708 #remove module
27+ modprobe i2c_bcm2708 baudrate=9600 #load module specifying baudrate
28+
29+
30+ Alternatively add ` dtparam=i2c_baudrate=9600 ` to the end of ` /boot/flash/config.txt ` and reboot.
31+
32+ Example: loading Microinfinity CruizCore XG1300L I2C/NXT driver manually:
33+
34+ echo mi-xg1300l 0x01 > /sys/bus/i2c/devices/i2c-1/new_device
35+
36+ Finally you can use the sensor through ` /sys/class/lego-sensor/sensor# ` interface.
37+
38+ [ using-i2c-sensors ] : /docs/sensors/using-i2c-sensors
39+ [ supported-sensors ] : /docs/sensors#supported-sensors
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ sensor multiplexers fall into this category (see list below). Simple
1010multiplexers that only support one connection type will not have a separate
1111driver for the port.
1212
13+ Input Port 5 on the BrickPi is physically wired to the I2C pins on the RaspberryPi.
14+ See [ brickpi-in-port-5] for the details.
15+
1316Port drivers use the [ lego-port class] to provide a common interface for
1417interacting with individual ports. Follow the link for more information.
1518
@@ -44,4 +47,5 @@ kernel.
4447
4548[ sensors ] : ../sensors
4649[ motors ] : ../motors
47- [ lego-port class ] : /docs/drivers/lego-port-class
50+ [ brickpi-in-port-5 ] : /docs/ports/brickpi-in-port-5
51+ [ lego-port class ] : /docs/drivers/lego-port-class
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ title: Using I2C Sensors
77
88The I2C standards only specify how data is sent from device to device. It does
99not specify the layout of the registers of a device. LEGO, however, has
10- guidelines for 3rd party manufactures so that they can providpe sensors with
10+ guidelines for 3rd party manufactures so that they can provide sensors with
1111a (fairly) uniform register layout.
1212
1313We call sensors that were designed following LEGO's guidelines ** NXT/I2C**
You can’t perform that action at this time.
0 commit comments