   }
   led2_state = led2_state ? LOW : HIGH;
   digitalWrite(LED2, led2_state);
+  mins_since_last_remote_command = 0;
 }
 
 void hm10_beacon_send_current_brightness() {

  cmd.raw = Serial.read();
  if (cmd.raw != Serial.peek())
    return;
  Serial.read();  // Consume the copy msg;
  if (cmd.op == SET_PERIOD)  {
    switch (cmd.channel) {

  ch3.initialize();
  ch4.initialize();

  mins_since_last_remote_command = 0;
  Serial.begin(9600);
  initialize_hm10_beacon();

