       case 3: ch4.set_duty_cycle_smoothing_rate(cmd.value); break;
     }
   }
-  led2_state = led2_state ? LOW : HIGH;
-  digitalWrite(LED2, led2_state);
-  mins_since_last_remote_command = 0;
+  g_led2_state = g_led2_state ? LOW : HIGH;
+  digitalWrite(LED2, g_led2_state);
+  g_mins_since_last_remote_command = 0;
 }
 
 void hm10_beacon_send_current_brightness() {

      duty_cycle_smoothing_rate_us_ = INITIAL_SMOOTHING_US;
    }

    void on_zero_cross(const uint32_t& last_zerocross_time) {
      // Perform smoothing adjustement to converge towards the
      // |target_duty_cycle_us| set-point.
      if (current_duty_cycle_us_ > target_duty_cycle_us_) {

  }
}

bool initialize_hm10_attempt() {
  Serial.setTimeout(2000);

