Click or drag to resize

libspiagentspiagent_legorc_put Method

Send LEGO® Power Functions Remote Control command.

Namespace: IO.Bindings
Assembly: libsimpleio (in libsimpleio.dll) Version: 2.2026.331.1
Syntax
C#
public static void spiagent_legorc_put(
	uint pin,
	uint channel,
	uint motor,
	uint direction,
	uint speed,
	out int error
)

Parameters

pin  UInt32
GPIO pin number to drive infrared emitter.
channel  UInt32
Channel number (1 to 4).
motor  UInt32
Motor ID (0 to 4: All Stop, Motor A, Motor B, Combo Direct, Combo PWM).
direction  UInt32
Direction (0 to 1: reverse, forward).
speed  UInt32
Speed control (0 to 7 for Motor A or Motor B, 0 to 15 for Combo Direct, and 0 to 255 for Combo PWM
error  Int32
Set to 0 upon success, or an errno error number upon failure.
See Also