
To send data via a [started UART](https://www.google.com/search?q=/reference/common/uart/), use the [uart.send()](https://www.google.com/search?q=https://obniz.github.io/obniz/obnizjs/classes/obnizcore.components.peripheraluart.html%23send) method.

```javascript
// Javascript Example

const uart = obniz.getFreeUart();
uart.start({tx: 0, rx: 1, baud: 9600 });
uart.send("Hello");
uart.send([0x00, 0x01, 0x02]);

```

The [uart.send()](https://www.google.com/search?q=https://obniz.github.io/obniz/obnizjs/classes/obnizcore.components.peripheraluart.html%23send) method does not wait for the transmission to complete (non-blocking). Additionally, since UART does not verify whether the receiver has actually received the data, no error will occur even if the communication partner is not connected.

---

## DE (Driver Enable)

When using UART for RS422 or RS485 communication, you can automatically manage the **DE (Driver Enable)** pin, which indicates the transmission state.

For example, if the DE pin of an external transceiver is connected to IO2, you can specify it as follows:

```javascript
uart.setDE(2);

```

Once specified, the DE pin will be automatically toggled high/low before and after data is transmitted via the `send()` function.

```javascript
// Javascript Example

const uart = obniz.getFreeUart();
uart.start({tx: 0, rx: 1, baud: 9600 });
uart.setDE(2);
uart.send("Hello");
uart.send([0x00, 0x01, 0x02]);

```

