Original BLINK doesn't work on Web editor

I'm getting back into the Arduino after a few years away. I noticed the classic Blink example has been changed.

Instead of using
pinMode(13, OUTPUT);

it's now
pinMode(LED_BUILTIN, OUTPUT);

The original classic pinMode(13, OUTPUT); still works fine on the desktop IDE 1.8.16, but on the web editor I get a compile error and was wondering why.

Errors below...
/tmp/261473610/BLINK_old_style/Blink.ino: In function 'void setup()':

/tmp/261473610/BLINK_old_style/Blink.ino:9:6: error: redefinition of 'void setup()'

void setup() {

^~~~~

/tmp/261473610/BLINK_old_style/BLINK_old_style.ino:3:6: note: 'void setup()' previously defined here

void setup()

^~~~~

/tmp/261473610/BLINK_old_style/Blink.ino: In function 'void loop()':

/tmp/261473610/BLINK_old_style/Blink.ino:15:6: error: redefinition of 'void loop()'

void loop() {

^~~~

/tmp/261473610/BLINK_old_style/BLINK_old_style.ino:8:6: note: 'void loop()' previously defined here

void loop()

^~~~

Error during build: exit status 1

Weird. I think the file was corrupt. I modified the new built in BLINK to use the old variables and now it compiles correctly.

Looks like you accidentally got both .ino files in the same project.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.