Write to Low Speed bus.

Namespace:  AForge.Robotics.Lego
Assembly:  AForge.Robotics.Lego (in AForge.Robotics.Lego.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public bool LsWrite(
	NXTBrick..::.Sensor sensor,
	byte[] data,
	int expectedBytes
)

Parameters

sensor
Type: AForge.Robotics.Lego..::.NXTBrick..::.Sensor
Sensor to write to.
data
Type: array< System..::.Byte >[]()[]
Data to send to the I2C device.
expectedBytes
Type: System..::.Int32
Number of bytes expected from device on reply, [0..16]. Can be set to zero if I2C command does not suppose any reply.

Return Value

Returns true if command was executed successfully or false otherwise.

Exceptions

ExceptionCondition
System..::.ArgumentExceptionData length must be in the [1..16] range.

See Also