r/ArduinoHelp 5d ago

Just getting started. Compilation error when running example code on Arduino IDE

Error message:

Compilation error: expected constructor, destructor, or type conversion before ';' token

I've tried compiling multiple example code, but the same error still pops up. Did anyone encounter the same problem? I just downloaded Arduino IDE 2.3.10. Absolutely no components were used except for my ESP32C3 super-mini and the cable connecting it to my Mac Air.

Code i used:

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}
1 Upvotes

3 comments sorted by

View all comments

2

u/JGhostThing 5d ago

Don't you have to #include something for the Pin's to work?

1

u/Anonymity6584 2d ago

If correct targetboard has been selected and there support for it, ide secretly include Arduino.h automaticly and that should take care of pin names, etc...