Source: https://mokxi.com/errors/no-matching-function-for-call
Updated: 2026-11-16

Home / Errors
Arduino build error

# error: no matching function for call to 'digitalWrite(int)'

The function exists, but not with the arguments you gave it. There are too few, too many, or one is the wrong type.

Try the fixed sketch in Mokxi See the causes

- Build error
- 3 common causes
- Seen 487 times in failed builds on Mokxi in the 30 days to November 16, 2026.

The message

## What the Arduino IDE prints

Output window

The notes under the error list the versions that do exist. Compare them with your call.

Mokxi's compiler, clang, words it as too few arguments to function call, or no matching function for call.

Causes

## The 3 usual causes with the fix

### 1Too few arguments

digitalWrite needs the pin and the level. Check the reference for what the call takes.

Broken

Fixed

Mokxi’s build tab says: digitalWrite is called with values it does not take.

Try this fix in Mokxi

### 2Your own function is called with the wrong arguments

A function with two parameters cannot be called with one. Add the argument, or give the parameter a default value.

Broken

Fixed

Mokxi’s build tab says: add is called with values it does not take.

Try this fix in Mokxi

### 3An argument is the wrong type

A text string cannot go where a number is wanted. Convert it first, with a call such as toInt().

Broken

Fixed

Mokxi’s build tab says: delay is called with values it does not take.

Try this fix in Mokxi

FAQ

## Questions and answers

### What does "no matching function for call" mean?

No version of that function accepts the arguments you wrote. Count them and check their types.

### Where do I see what the function does take?

The lines that start with "note: candidate" under the error list every version. In Mokxi the build tab shows the first one.

### Why does it name a type like int in the message?

The message shows the types of the arguments you passed. Compare them with the types in the candidate lines.

Next

## More errors and the longer guide

- error: cannot convert 'String' to 'const char*'
- error: call of overloaded 'show(double)' is ambiguous

Every Arduino compile error All Arduino errors
