Skip to Content
Circuitera

Read “no matching function for call” on Arduino

Read the first failed call and the compiler’s candidate signature to fix a wrong Arduino argument count.

Look for the candidates under the first error

The compiler found a function name but could not use any visible signature for the arguments given. A candidate listing may show the declared parameter types and the number required. This differs from an undeclared function or a missing header. Read the expected signature for the library version selected by the build.

Fix the call at the source

The helpers below accept a pin and state, or a pin, state and hold time. The call with one argument has no viable candidate. Supply the state with an appropriate type. When using a library, check the installed example and header before adding casts. Casting may hide a version mismatch or send the wrong data to a device.

Open the exact Uno example

Removing the second argument reproduces the overload error. The corrected example compiles.

void setOutput(byte pin, bool enabled) {
  digitalWrite(pin, enabled ? HIGH : LOW);
}
void setOutput(byte pin, bool enabled, unsigned long holdMs) {
  setOutput(pin, enabled);
  delay(holdMs);
}
void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  setOutput(LED_BUILTIN, true);
}
void loop() {}

Verified with [email protected] on Uno R3 (2026-12-05 UTC). The intentionally broken variant reproduced the named diagnostic. This check did not use physical hardware.

Continue learning

Sources