 
   void sample_request();
   void sample_await(uint32_t ms);
-
-  friend IOStream& operator<<(IOStream& outs, Probe& probe);
 };
 
 IOStream& operator<<(IOStream& outs, Probe& probe)

  probe.set_mode(IOPin::INPUT_MODE);
  DELAY(40);

  // Wait for the response
  probe.sample_request();
  probe.sample_await(1000);

  // Print samples (micro-second pulses)
  trace << probe << endl;

  enable();
}

void
Probe::sample_await(uint32_t ms)
{
  uint32_t start = RTC::millis();
  DELAY(HIGH_THRESHOLD);
  while (m_sampling && (RTC::since(start) < ms)) {
    Power::sleep(SLEEP_MODE_IDLE);
    uint16_t us = (RTC::micros() - m_start);
    if (us > 1000) break;
  }
  disable();
}

// Probe probe(Board::EXT0, ExternalInterrupt::ON_CHANGE_MODE, 20, 100);
Probe probe(Board::EXT0, ExternalInterrupt::ON_FALLING_MODE, 30, 300);
// Probe probe(Board::EXT0, ExternalInterrupt::ON_RISING_MODE, 30, 300);

void setup()
{
