# digitalWrite()

Change the setting of the digital output pins.

```cpp
static inline void digitalWrite(uint8_t u8pin, E_PIN_STATE ulVal)
```

The first parameter specifies the pin number to be set, and the second parameter specifies either `HIGH` or `LOW`.

{% hint style="info" %}
The input is of type `E_PIN_STATE`. The conversion operator from `E_PIN_STATE` to `int` type is not defined, so direct numeric input is not allowed.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mwx.twelite.info/latest_en/api-reference/funcs/dio/digitalwrite.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
