The UART element is used to read and write data over UART on the end device’s transmit (Tx) and receive (Rx) lines.
The UART element is located in the Element Toolbox within Studio’s Embedded tab.
The following properties can be changed for the UART element:
The name of the element.
The UART driver instance number to use. If unsure leave it set to the default value.
Number of Read Bytes
The number of bytes the element will read up to at a time.
Number of Write Bytes
The number of bytes the element will write up to at a time.
The following triggers are available to execute events from within the UART element:
Execute an event when the source element connected to the UART triggers.
Execute an event when the UART’s value is read.
Execute an event when a byte is received over the end device’s Rx line.
Execute an event when data is written over the end device’s Tx line.
Execute an event when data is written over the end device’s Tx line while blocking execution.
The following abilities are available for the UART element when its source element triggers:
Trigger the element(s) that follow the UART element.
Read data over the end device’s Rx line.
Receive byte(s) over the end device’s Rx line.
Write data over the end device’s Tx line.
Write data over the end device’s Tx line block execution until all data is flushed from the TX buffer out the line.
Atmosphere includes a selection of resources for users of all levels that demonstrate using the UART element.
To view the UART element used within a project, click the demo’s name to open the project in Atmosphere and see how the element is set up.
|UART Element Demo||Arduino Mega||The UART element is used within this demo project that sends “Hello123” one byte at a time over UART while also demonstrating the buffering and RegEx capabilities of Atmosphere’s UART driver. Note this demo uses UART2, and connect IO18 and IO19 on the Arduino Mega to send TX back to RX.|