Documentation ¶
Overview ¶
Package brickpi provides brickpi-specific and higher level access to the ev3dev control and sensor drivers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Blue1 and Blue2 are the blue LEDs on // the BrickPi board. Blue1 = &ev3dev.LED{Name: brickPiLED(1)} Blue2 = &ev3dev.LED{Name: brickPiLED(2)} // Green and Red are the green and red LEDs // on the Raspberry Pi board. // // These LED devices are normally writable // only by root, so permissions will need // to be correctly set prior to use. Green = &ev3dev.LED{Name: raspberryPiLED(0)} Red = &ev3dev.LED{Name: raspberryPiLED(1)} )
LED handles for BrickPi devices.
Functions ¶
func SensorFor ¶
SensorFor returns an ev3dev.Sensor for the given BrickPi port name and driver. SensorFor uses the default address for the device. When the sensor is no longer being used, Unregister should be called for the port.
BrickPi and BrickPi+ sensor port names are:
- serial0-0:S1
- serial0-0:S2
- serial0-0:S3
- serial0-0:S4
BrickPi3 sensor port names are:
- spi0.1:S1
- spi0.1:S2
- spi0.1:S3
- spi0.1:S4
func SensorForAddr ¶
SensorForAddr returns an ev3dev.Sensor for the given BrickPi port name, driver and address. When the sensor is no longer being used, Unregister should be called for the port.
Types ¶
This section is empty.
Notes ¶
Bugs ¶
Device drivers for NXT/I2C devices with special operations will not work with the BrickPi.
EV3 UART sensors do not work correctly, apparently due to timing problems in the Dexter Industries firmware for the BrickPi devices.