예제 #1
0
/*
 * \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;
}
예제 #2
0
void setup() {
    Serial.begin(115200);
    Serial.println("Sleepy, build " __DATE__ " " __TIME__);

    pinMode(LED_PIN, OUTPUT);

    watchdogSetup(WDTO_8S);
}
예제 #3
0
파일: main.cpp 프로젝트: jucs/arduino-due
int main(void) {
  // Initialize watchdog
  watchdogSetup();

  init();

//	initVariant();

  delay(1);

#if defined(USBCON)
//	USBDevice.attach();
#endif

  setup();

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

  return 0;
}