     // Try to process messages from the messaging server, and if we're
     // disconnected attempt to reconnect.
     if (!mqtt.loop()) {
-#if DEBUG
+#ifdef DEBUG
         Serial.println("Disconnected from messaging server, reconnecting.");
 #endif
         while (!mqtt.connect("arduino-beaconbot", MQTT_USER, MQTT_PASSWORD)) {


}

/**
 * Chase brand lighting animation routine.
 */
void anim_chase()
{

    // Special case to ensure the final light is enabled before this animation
    // routine terminates.
    if (brand_percent == 255) {
        memcpy(brand_leds, brand_leds_p, sizeof(CRGB) * BRAND_COUNT);
    } else {
        // Iterate over all lights, setting an LED to black based on the current
        // progress and copying the rest from the previous value. 
        for (int i = 0; i < BRAND_COUNT; i++) {
            if (scale8(brand_percent, BRAND_COUNT) == i) {
                brand_leds[i] = CRGB::Black;
            } else {
                brand_leds[i] = brand_leds_p[i];
            }
        }
    }

    // Update the display.
    FastLED.show();

}

/**
 * Blink brand lighting animation routine.
 */
void anim_blink()
{
    if ((brand_percent / 16) % 2 == 0) {
        fill_solid(brand_leds, BRAND_COUNT, CRGB::Black);
    } else {
        memcpy(brand_leds, brand_leds_p, sizeof(CRGB) * BRAND_COUNT);
    }
    FastLED.show();
}

/**
 * Pick and fade to a random colour.
 */
void anim_fade()
{
    static CRGB target;

    // If this is the beginning of a fade, pick a random colour.
    if (brand_percent == 0) {
        CHSV rnd;
        rnd.h = random8();
        rnd.s = 255;
        rnd.v = 255;
        target = rnd;
    }

    // Interpolate the current colour.
    CRGB current;
    current.r = lerp8by8(brand_leds_p[0].r, target.r, brand_percent);
    current.g = lerp8by8(brand_leds_p[0].g, target.g, brand_percent);
    current.b = lerp8by8(brand_leds_p[0].b, target.b, brand_percent);

    // Fill the array and show the result.
    fill_solid(brand_leds, BRAND_COUNT, current);
    FastLED.show();
}


#endif
    mqtt_wifi.stop();

    // Indicate that we have connected to the test server.
    fill_solid(base_leds, BASE_COUNT, CRGB::Blue);
    fill_solid(brand_leds, BRAND_COUNT, CRGB::Blue);
    FastLED.show();

    // Connect to the messaging server and subscribe.
#ifdef DEBUG
