/* * \brief Main entry point of Arduino application */ int main( void ) { /* Initialize watchdog */ watchdogSetup(); /* Initialize the Arduino Core API */ init(); /* Initialize the variant */ initVariant(); delay(1); #if defined(USBCON) USBDevice.init(); USBDevice.attach(); #endif setup(); for (;;) { loop(); if (serialEventRun) serialEventRun(); } return 0; }
void setup() { Serial.begin(115200); Serial.println("Sleepy, build " __DATE__ " " __TIME__); pinMode(LED_PIN, OUTPUT); watchdogSetup(WDTO_8S); }
int main(void) { // Initialize watchdog watchdogSetup(); init(); // initVariant(); delay(1); #if defined(USBCON) // USBDevice.attach(); #endif setup(); for (;;) { loop(); // if (serialEventRun) serialEventRun(); } return 0; }