C# Class Lego.Ev3.Desktop.BluetoothCommunication

Communicate to EV3 brick over Bluetooth
Inheritance: ICommunication
ファイルを表示 Open project: BrianPeek/legoev3 Class Usage Examples

Public Methods

Method Description
BluetoothCommunication ( string port ) : System

Initialize a BluetoothCommunication object.

ConnectAsync ( ) : System.Threading.Tasks.Task

Connect to the EV3 brick.

Disconnect ( ) : void

Disconnect from the EV3 brick.

WriteAsync ( byte data ) : System.Threading.Tasks.Task

Write data to the EV3 brick.

Private Methods

Method Description
SerialPortDataReceived ( object sender, System.IO.Ports.SerialDataReceivedEventArgs e ) : void

Method Details

BluetoothCommunication() public method

Initialize a BluetoothCommunication object.
public BluetoothCommunication ( string port ) : System
port string The COM port on which to connect.
return System

ConnectAsync() public method

Connect to the EV3 brick.
public ConnectAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

Disconnect() public method

Disconnect from the EV3 brick.
public Disconnect ( ) : void
return void

WriteAsync() public method

Write data to the EV3 brick.
public WriteAsync ( byte data ) : System.Threading.Tasks.Task
data byte Byte array of data to send to the EV3 brick.
return System.Threading.Tasks.Task