Language
Edit

ArduinoBoard.TryFindBoard Method

Definition

Overloads

Name Description
TryFindBoard(ArduinoBoard)

Searches all available com ports for an Arduino device.

TryFindBoard(IEnumerable<String>, IEnumerable<Int32>, ArduinoBoard)

Searches the given list of com ports for a firmata device.

TryFindBoard(ArduinoBoard)

Searches all available com ports for an Arduino device.

public static bool TryFindBoard(out Iot.Device.Arduino.ArduinoBoard? board);
static member TryFindBoard : ArduinoBoard -> bool
Public Shared Function TryFindBoard (ByRef board As ArduinoBoard) As Boolean

Parameters

board
ArduinoBoard

A board, already open and initialized. Null if none was found.

Returns

True if a board was found, false otherwise

Remarks

Scanning serial ports may affect unrelated devices. If there are problems, use the TryFindBoard(IEnumerable<String>, IEnumerable<Int32>, ArduinoBoard) overload excluding ports that shall not be tested.

Applies to

TryFindBoard(IEnumerable<String>, IEnumerable<Int32>, ArduinoBoard)

Searches the given list of com ports for a firmata device.

public static bool TryFindBoard(System.Collections.Generic.IEnumerable<string> comPorts, System.Collections.Generic.IEnumerable<int> baudRates, out Iot.Device.Arduino.ArduinoBoard? board);
static member TryFindBoard : seq<string> * seq<int> * ArduinoBoard -> bool
Public Shared Function TryFindBoard (comPorts As IEnumerable(Of String), baudRates As IEnumerable(Of Integer), ByRef board As ArduinoBoard) As Boolean

Parameters

comPorts
IEnumerable<String>

List of com ports. Can be used with GetPortNames().

baudRates
IEnumerable<Int32>

List of baud rates to test. CommonBaudRates().

board
ArduinoBoard

[Out] Returns the board reference. It is already initialized.

Returns

True on success, false if no board was found

Remarks

Scanning ports and testing for devices may affect unrelated devices. It is advisable to exclude ports known to contain other hardware from this scan. A board won't be found if its port is already open (by the same or a different process).

Applies to