updated example
This commit is contained in:
@@ -25,6 +25,7 @@ do {
|
||||
print("Serial port \(portName) opened successfully.")
|
||||
defer {
|
||||
serialPort.closePort()
|
||||
print("Port Closed")
|
||||
}
|
||||
|
||||
serialPort.setSettings(receiveRate: .baud9600,
|
||||
@@ -74,8 +75,8 @@ do {
|
||||
}
|
||||
}
|
||||
|
||||
print("End of example");
|
||||
|
||||
print("We successfully received back \(numberOfMultiNewLineTest) lines")
|
||||
|
||||
} catch PortError.failedToOpen {
|
||||
print("Serial port \(portName) failed to open. You might need root permissions.")
|
||||
|
||||
Reference in New Issue
Block a user