     // Read sensor data
     float temperature = NAN;
     float humidity = NAN;
-    bool sensorReadingSuccessful = readSensorData(&temperature, &humidity);
+    uint16_t brightness = NAN;
+    bool sensorReadingSuccessful = readSensorData(&temperature, &humidity, &brightness);
 
     // Log sensor data
     bool dataLoggingSuccessful = false;

    for (uint8_t sensorReadAttempt = 0; sensorReadAttempt < SENSOR_READING_ATTEMPTS; sensorReadAttempt++) {
        *temperature = weatherSensor.readTemperature(false, false);
        *humidity = weatherSensor.readHumidity(false);

        bool isTemperatureValid = !isnan(*temperature) && *temperature >= -40.0 && *temperature <= 80.0;
        bool isHumidityValid = !isnan(*humidity) && *humidity >= 0.0 && *humidity <= 100.0;

        if (isTemperatureValid && isHumidityValid) {
            Serial.print("Reading sensor data successful (temperature: ");
            Serial.print(*temperature);
            Serial.print("C, humidity: ");
            Serial.print(*humidity);
            Serial.println("%)");

            return true;
        }

const char* UBIDOTS_TOKEN = "";           // Ubidots token (secret)
const char* UBIDOTS_ID_TEMPERATURE = "";  // Ubidots temperature source id
const char* UBIDOTS_ID_HUMIDITY = "";     // Ubidots humidity source id
const char* UBIDOTS_ID_BRIGHTNESS = "";   // Ubidots brightness source id


// Initialization
