Skip to content

Commit 12d8bdd

Browse files
bmeglidlech
authored andcommitted
Brickpi docs update (input port 5) (ev3dev#167)
* typo: providpe -> provide * Added docs for input 5 in BrickPi * Added suggested changes for Input Port 5 on the BrickPi * Better docs Changed some wording Added link to using-i2c-sensors Clarified which sensors work on port 5, added link to supported sensors table * Improved readability Added some sections etc * Added back link to using-i2c-sensors
1 parent 16a02ac commit 12d8bdd

3 files changed

Lines changed: 45 additions & 2 deletions

File tree

docs/ports/brickpi-in-port-5.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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

docs/ports/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ sensor multiplexers fall into this category (see list below). Simple
1010
multiplexers that only support one connection type will not have a separate
1111
driver 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+
1316
Port drivers use the [lego-port class] to provide a common interface for
1417
interacting 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

docs/sensors/using-i2c-sensors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Using I2C Sensors
77

88
The I2C standards only specify how data is sent from device to device. It does
99
not 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
1111
a (fairly) uniform register layout.
1212

1313
We call sensors that were designed following LEGO's guidelines **NXT/I2C**

0 commit comments

Comments
 (0)