 static void tx_func (osjob_t* job) {
   // say hello
   tx("Hello, world!", txdone_func);
-  // reschedule job every 1000-1500ms, unless packets are received, then
-  // rx_func will reschedule more often
-  os_setTimedCallback(job, os_getTime() + ms2osticks(1000 + random(500)), tx_func);
+  // reschedule job every TX_INTERVAL (plus a bit of random to prevent
+  // systematic collisions), unless packets are received, then rx_func
+  // will reschedule at half this time.
+  os_setTimedCallback(job, os_getTime() + ms2osticks(TX_INTERVAL + random(500)), tx_func);
 }
 
 // application entry point

       config.h in the lmic library to set it.
#endif

const lmic_pinmap lmic_pins = {
  .nss = SS,
  .rxtx = 8, // Not connected
  .rst = A7, // Not connected
  .dio = {4, 5, 7},
};

//LMIC application callbacks not used in his example


void loop() {
  // execute scheduled jobs and events
  os_runloop_once();
}
