ArduinoBoard Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| ArduinoBoard(Stream) |
Creates an instance of an Ardino board connection using the given stream (typically from a serial port) |
| ArduinoBoard(Stream, Boolean) |
Creates an instance of an Ardino board connection using the given stream (typically from a serial port) |
| ArduinoBoard(String, Int32) |
Creates an instance of the Arduino board connection connected to a serial port |
ArduinoBoard(Stream)
Creates an instance of an Ardino board connection using the given stream (typically from a serial port)
public ArduinoBoard(System.IO.Stream serialPortStream);
new Iot.Device.Arduino.ArduinoBoard : System.IO.Stream -> Iot.Device.Arduino.ArduinoBoard
Public Sub New (serialPortStream As Stream)
Parameters
- serialPortStream
- Stream
A stream to an Arduino/Firmata device
Remarks
The device is initialized when the first command is sent. The constructor always succeeds.
Applies to
ArduinoBoard(Stream, Boolean)
Creates an instance of an Ardino board connection using the given stream (typically from a serial port)
public ArduinoBoard(System.IO.Stream serialPortStream, bool usesHardwareFlowControl);
new Iot.Device.Arduino.ArduinoBoard : System.IO.Stream * bool -> Iot.Device.Arduino.ArduinoBoard
Public Sub New (serialPortStream As Stream, usesHardwareFlowControl As Boolean)
Parameters
- serialPortStream
- Stream
A stream to an Arduino/Firmata device
- usesHardwareFlowControl
- Boolean
True to indicate that the stream supports hardware flow control (can be a serial port with RTS/CTS handshake or a network stream where the protocol already supports flow control)
Remarks
The device is initialized when the first command is sent. The constructor always succeeds.
Applies to
ArduinoBoard(String, Int32)
Creates an instance of the Arduino board connection connected to a serial port
public ArduinoBoard(string portName, int baudRate);
new Iot.Device.Arduino.ArduinoBoard : string * int -> Iot.Device.Arduino.ArduinoBoard
Public Sub New (portName As String, baudRate As Integer)
Parameters
- portName
- String
Port name. On Windows, this is usually "COM3" or "COM4" for an Arduino attached via USB. On Linux, possible values include "/dev/ttyAMA0", "/dev/serial0", "/dev/ttyUSB1", etc.
- baudRate
- Int32
Baudrate to use. It is recommended to use at least 115200 Baud.