# Basic usage
Before start using this library you have to know some basic concepts.
# Get available serial ports
You can search for connected and available serial ports in the system and get these using one of the following two methods.
# Obtaining as String Array
string[] portsList = SimplePort.GetAvailablePorts();
# Obtaining as String List
List<string> portsList = SimplePort.GetAvailablePortsList();
# Creating a SimplePort instance
The methods included in SimplePort class are not static, excepting GetAvailablePorts() and GetAvailablePortsList(). For this reason it is necessary to create an instance of the class to be able to work during the operation cycle with a serial port.
To create the instance just use the following line:
SimplePort simplePort = new SimplePort();
# SimpleStopBits
Enum that specifies the number of stop bits used on the SimplePort object.
| Index | Enum |
|---|---|
| 0 | None |
| 1 | One |
| 2 | Two |
| 3 | OnePointFive |
Made by Andres Ruiz with ❤️
All rights reserved © 2024
All rights reserved © 2024