I just tried it, but the Arduino IDE crashed, I hope its not related. I want to declare a datatype like this:

int a = pinMode(pin, OUTPUT);

or something like that, but I'm not sure what datatype the pinMode function uses. I looked on the pinMode documentation page, of the Arduino website, and I see basic usage, but not a more clear definition of the source code for that function.

1 Answer 1


pinMode(pin, Mode); is a void. It doesn't return anything. It simply sets a pin as an OUTPUT or an INPUT.

It says it in the link you posted.



That means that the function doesn't return any value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.