 
 #define R 31.8975139158 //https://diarmuid.ie/blog/post/pwm-exponential-led-fading-on-arduino-or-other-platforms
 void setLed(String mRgb) {
-  // Convert it to long
+  // Convert it to long 
   long number = strtol(&mRgb[0], NULL, 16);  
   // Split them up into r, g, b values
   int r = number >> 16;

                onDisconnected();
            }
            lastAliveCheck = millis();            
            Serial.println("startAlive(" + String(esp8266alive) + ")");         
            Serial.println("connectAP(\"" + String(APssid) + "\", \"" + String(APpsw) + "\")");
        } else if (cb[0] == 'a') {
            lastAliveCheck = millis();
            checkComm();
        } else if (cb[0] == 'w') {
            //wifi connected
            Serial.println("mqttInit(\"" + String(MQTTid) + "\", \"" + String(MQTTip) + "\", " + MQTTport + ", \"" + String(MQTTuser)
                            + "\", \"" + String(MQTTpsw) + "\", " + MQTTalive + ", " + MQTTretry + ")");        
        } else if (cb[0] == 'c') {
            //mqtt connected
            connected = true;


void setup() {
  Serial.begin(9600);
  Serial.setTimeout(500);
  
  while(!connected)
    checkComm();    

  pinMode(buzzPin, OUTPUT);
  pinMode(statusPin, OUTPUT);
