Serial Component
Properties
baudRate Returns the current baud rate
Data type: number |
||
Designer Writable | true |
<serial name="serialName" baudRate="0"> |
Code Writeable | true |
serialName.baudRate = 0 |
Code Readable | true |
let variable = serialName.baudRate |
bufferSize Returns the buffer size in bytes
Data type: number |
||
Designer Writable | true |
<serial name="serialName" bufferSize="0"> |
Code Writeable | true |
serialName.bufferSize = 0 |
Code Readable | true |
let variable = serialName.bufferSize |
isInitialized Returns true when the Serial has been initialized.
Data type: boolean |
||
Designer Writable | false | |
Code Writeable | false | |
Code Readable | true |
let variable = serialName.isInitialized |
isOpen Returns true when the Serial connection is open.
Data type: boolean |
||
Designer Writable | false | |
Code Writeable | false | |
Code Readable | true |
let variable = serialName.isOpen |
class The styling class of the the component
Data type: string |
||
Designer Writable | true |
<serial name="serialName" class="Test class"> |
Code Writeable | false | |
Code Readable | false |
id The styling id of the the component
Data type: string |
||
Designer Writable | true |
<serial name="serialName" id="Test id"> |
Code Writeable | false | |
Code Readable | false |
name The name of the component that will be used to refer to it in code.
Data type: string |
||
Designer Writable | true |
<serial name="serialName" name="testComponent"> |
Code Writeable | false | |
Code Readable | false |
Methods
Method name | Description | Parameters | ||
---|---|---|---|---|
closeSerial |
Closes serial connection. Returns true when closed. serialName.closeSerial() |
|
||
initializeSerial |
Initializes serial connection. serialName.initializeSerial() |
|
||
openSerial |
Opens serial connection. Returns true when opened. serialName.openSerial() |
|
||
printSerial |
Writes given data to serial, and appends a new line at the end. serialName.printSerial(data) serialName.printSerial("Test data") |
|
||
readSerial |
Reads data from serial. serialName.readSerial() |
|
||
writeSerial |
Writes given data to serial. serialName.writeSerial(data) serialName.writeSerial("Test data") |
|