PaulS:
serialEvent() is called whenever Serial.available() > 0.
No. The serialEvent() function is called at the end of loop(), if Serial.available() returns greater than 0.
Of course
Thanks for pointing that out ![]()
#include <Arduino.h>
int main(void)
{
init();
#if defined(USBCON)
USBDevice.attach();
#endif
setup();
for (;;) {
loop();
if (serialEventRun) serialEventRun();
}
return 0;
}