             Serial.print("RUSK --> Sleep --> "); Serial.println(SLEEP_DELAY_STATUS);
 
             // publish sleep event
-            Spark.publish("Sleep", String(SLEEP_DELAY), SLEEP_DELAY, PRIVATE); delay(EVENTSDELAY);
+            Particle.publish("Sleep", String(SLEEP_DELAY), SLEEP_DELAY, PRIVATE); delay(EVENTSDELAY);
 
             // invoke light sleep mode
-            Spark.sleep(SLEEP_DELAY);
+            System.sleep(SLEEP_DELAY);
         }
         else
         {
             Serial.print("RUSK --> Relax --> "); Serial.println(RELAX_DELAY);
 
             // publish relax event
-            Spark.publish("Relax", String(RELAX_DELAY), RELAX_DELAY, PRIVATE); delay(EVENTSDELAY);
+            Particle.publish("Relax", String(RELAX_DELAY), RELAX_DELAY, PRIVATE); delay(EVENTSDELAY);
 
             // pause briefly anyway
             delay(RELAX_DELAY * 1000);

        {
            bufferPressure = event.pressure;
            /* The pressure is initially loaded into a buffer variable */
            /* We load it into the published variable this way to be compatible with the Spark.variable data types*/
            BMP180Pressure = bufferPressure;

            /* First we get the current temperature from the BMP085 */
            bmp180.getTemperature(&bufferTemperature);
            /* The temperature is initially loaded into a buffer variable */
            /* We load it into the published variable this way to be compatible with the Spark.variable data types*/
            BMP180Temperature = bufferTemperature;

            /* Then convert the atmospheric pressure, SLP and temp to altitude */

        //********************************************************************************
        //********************************************************************************

        //Initialize the I2C bus if not already enabled
        if (!Wire.isEnabled()) {
            Wire.begin();
        }

        // Scan for I2C devices
        Serial.println("RUSK --> ScanI2C --> Scanning I2C for devices...");
