   station->handle();
   if (reset_flag) station->reset();
 }
-
+

  // IR-station setup
  station = new IR_Station(PIN_IR_OUT, PIN_IR_IN, PIN_LED_R, PIN_LED_G, PIN_LED_B);
  station->begin();
  //pinMode(PIN_BUTTON, INPUT_PULLUP);
  //attachInterrupt(PIN_BUTTON, (void ICACHE_RAM_ATTR (*)()) ([]() {
  //  reset_flag = true;
  //}), RISING);
  pinMode(PIN_BUTTON, INPUT_PULLUP);
  attachInterrupt(PIN_BUTTON, rst_isr,  RISING);


IR_Station *station;
volatile bool reset_flag = false;

void ICACHE_RAM_ATTR rst_isr() {
  reset_flag = true;
}

void setup() {
  // prepare serial debug
  Serial.begin(74880);
  delay(10);
  println_dbg("");
