For exmaple, I look at the page for digitalWrite and all I get is this for the signature:

digitalWrite(pin, value)

No return value type, no paramater type, nothing.

Instead, in a seperate section it says


And then it says

pin: the Arduino pin number.
value: HIGH or LOW.

What is "value"? An int? uint8_t? bool? Why is the API written in such a weird ambigious way?

I would expect something like

void digitalWrite(uint8_t pin, uint8_t value)

Like I am used to from other "proper" API documentations.

  • Because it's written for novices by novices
    – Majenko
    Commented Apr 28, 2022 at 16:44
  • I found void digitalWrite(pin_size_t pinNumber, PinStatus status);. that is why.
    – Juraj
    Commented Apr 28, 2022 at 17:06
  • Most pages in Language/Functions do document the data types (I count 74 out of 137). This is more than it used to be, as documenting the types is an ongoing effort. You may participate by sending pull requests to arduino/reference-en. Commented Apr 28, 2022 at 17:18
  • See Specify data types in function definitions. I raised this issue in 2015 - that issue is still open 7 years later.
    – Nick Gammon
    Commented Apr 29, 2022 at 11:01
  • Try going to that Github page and supporting my request that the documentation be improved. Good luck!
    – Nick Gammon
    Commented Apr 29, 2022 at 11:03


Browse other questions tagged or ask your own question.