Browse Source

Sleep und Serial1 funktioniert

master
Ralf Behrens 4 years ago
parent
commit
05fbcd021b
  1. 11
      src/main.cpp

11
src/main.cpp

@ -66,7 +66,7 @@ static osjob_t sendjob; @@ -66,7 +66,7 @@ static osjob_t sendjob;
// Schedule TX every this many seconds (might become longer due to duty
// cycle limitations).
const unsigned TX_INTERVAL = 600;
const unsigned TX_INTERVAL = 60;
// Pin mapping
//
@ -227,12 +227,12 @@ void onEvent(ev_t ev) { @@ -227,12 +227,12 @@ void onEvent(ev_t ev) {
}
// Schedule next transmission
os_setTimedCallback(&sendjob, os_getTime() + sec2osticks(TX_INTERVAL), do_send);
/*
Serial1.println(F("vor sleep"));
Serial1.flush();
LowPower.sleep(1000);
LowPower.sleep(50000);
Serial1.println(F("wieder aufgewacht")); // => er wacht nicht wieder auf
*/
break;
case EV_LOST_TSYNC:
Serial1.println(F("EV_LOST_TSYNC"));
@ -288,6 +288,9 @@ void setup() { @@ -288,6 +288,9 @@ void setup() {
Serial1.begin(19200);
Serial1.println(F("Starting 1.04"));
Serial1.println(F(__FILE__));
Serial1.println(F(__DATE__));
#ifdef __SAMD21G18A__
Serial1.println(F("SAMD21G18A ARM Cortex-M0+ detected"));

Loading…
Cancel
Save