 /*
   CONFIGURATION for ENDNODE PCB
-  25/04/2019
-  Version 17.0 XX
+  30/04/2019
+  Version 17.1 XX
   Author: Franco Parenti
   Url:
   Support for Arduino Fio V3, Arduino Leonardo

  Serial.println( msg[num]);
}

/*
  void convertColors(long c)
  {

  String x = String(c, HEX);

  long number = (long) strtol( &x[0], NULL, 16);
  byte r = number >> 16;
  byte g = number >> 8 & 0xFF;
  byte b = number & 0xFF;

  Serial.println(r , HEX);
  Serial.println(g , HEX);
  Serial.println(b , HEX);

  //color.red = g; //verde
  //color.green = b; //blu
  //color.blue = r; //rosso

  }
*/

void checkAwinig()
{
  if (awning_started == true) {
    if (millis() - 15000 > awning_starttime) {
      digitalWrite(10, LOW); //Disattiva il comando (fase/neutro)
      delay(500);
      digitalWrite(11, LOW); //disattiva led tenda 1
      delay(500);
      digitalWrite(14, LOW); //disattiva led tenda 2
      awning_started = false;
      tone(8, 4500, 100);
      delay(400);
      tone(8, 4500, 100);
    }
  }
  else if (awning_started == false) {
    if (sensors[0][1] != 0 || sensors[1][1] != 0) {
      digitalWrite(10, LOW); //Disattiva il comando (fase/neutro)
      digitalWrite(11, LOW); //disattiva led tenda 1
      digitalWrite(14, LOW); //disattiva led tenda 2
    }
  }
}

  /* begin the common part */
  xbee.send(tx);
  xbee.readPacket(500);
  if (xbee.getResponse().isAvailable()) //got something
  {
    log(7);
