Skip to main content
Arduino

Return to Answer

Typo fix - answerer had miscopied the function name from the code block above. Also capitalised Ardunio correctly, added a full stop to a sentence.
Source Link

Those pieces of code are pretty much the same.

If you look at the arduinoArduino source code you'll see:

setup();
for (;;) {
 loop();
 if (serialEventRun) serialEventRun();
}

(I'm not sure what serialEventserialEventRun() does.)

I don't think you can 'overload' the main function declaration. Also note that the main function calls init, which e.g. configures the timers, so millis() etc. will work.

Those pieces of code are pretty much the same.

If you look at the arduino source code you'll see:

setup();
for (;;) {
 loop();
 if (serialEventRun) serialEventRun();
}

(I'm not sure what serialEvent() does)

I don't think you can 'overload' the main function declaration. Also note that the main function calls init, which e.g. configures the timers, so millis() etc. will work.

Those pieces of code are pretty much the same.

If you look at the Arduino source code you'll see:

setup();
for (;;) {
 loop();
 if (serialEventRun) serialEventRun();
}

(I'm not sure what serialEventRun() does.)

I don't think you can 'overload' the main function declaration. Also note that the main function calls init, which e.g. configures the timers, so millis() etc. will work.

Those pieces of code are pretty much the same.

If you look at the arduino source code arduino source code you'll see:

setup();
for (;;) {
 loop();
 if (serialEventRun) serialEventRun();
}

(I'm not sure what serialEvent() does)

I don't think you can 'overload' the main function declaration. Also note that the main function calls init, which e.g. configures the timers, so millis() etc. will work.

Those pieces of code are pretty much the same.

If you look at the arduino source code you'll see:

setup();
for (;;) {
 loop();
 if (serialEventRun) serialEventRun();
}

(I'm not sure what serialEvent() does)

I don't think you can 'overload' the main function declaration. Also note that the main function calls init, which e.g. configures the timers, so millis() etc. will work.

Those pieces of code are pretty much the same.

If you look at the arduino source code you'll see:

setup();
for (;;) {
 loop();
 if (serialEventRun) serialEventRun();
}

(I'm not sure what serialEvent() does)

I don't think you can 'overload' the main function declaration. Also note that the main function calls init, which e.g. configures the timers, so millis() etc. will work.

Source Link
Gerben
  • 11.3k
  • 3
  • 22
  • 34

Those pieces of code are pretty much the same.

If you look at the arduino source code you'll see:

setup();
for (;;) {
 loop();
 if (serialEventRun) serialEventRun();
}

(I'm not sure what serialEvent() does)

I don't think you can 'overload' the main function declaration. Also note that the main function calls init, which e.g. configures the timers, so millis() etc. will work.

lang-cpp

AltStyle によって変換されたページ (->オリジナル) /