   if (rawMode) {
     String data = rf.pulseTrainToString(pulses, length);
     if (data.length() > 0) {
-      Serial.print("RAW RF signal (");
+      Serial.print(F("RAW RF signal ("));
       Serial.print(length);
-      Serial.print("): ");
+      Serial.print(F("): "));
       Serial.print(data);
       Serial.println();
 
-      mqtt.publish((mainTopic + "/recvRaw").c_str(), data.c_str());
+      mqtt.publish((mainTopic + F("/recvRaw")).c_str(), data.c_str());
     }
   }
 }

  strncpy(payload, (char *)payload_, length);
  payload[length] = '\0';

  String sendTopic = globalTopic + "/send/";
  if (topic.startsWith(sendTopic)) {
    transmitt(topic.substring(sendTopic.length()), payload);
  }
  sendTopic = mainTopic + "/send/";
  if (topic.startsWith(sendTopic)) {
    transmitt(topic.substring(sendTopic.length()), payload);
  }
  if (topic == (mainTopic + "/set/raw")) {
    Serial.println("Change raw mode.");
    if (payload[0] == '1') {
      rawMode = true;
    }

  beatLED.on();
  // We start by connecting to a WiFi network
  Serial.println();
  Serial.print(F("Connecting to "));
  Serial.println(ssid);

  WiFi.begin(ssid, password);
