   if (Serial.available()) {
     if (Serial.read() == SILENCE_COMMAND) {
       deviceMode = SOUND_OFF;
-    } 
+    }
   }
 
-  int sensorReading = analogRead(SENSOR_PIN);
-  Serial.println(sensorReading);
+  int sensorReading = 1023;//analogRead(SENSOR_PIN);
 
-  if (sensorReading < RAIN_THRESHOLD) {
+  bool isRaining = sensorReading < RAIN_THRESHOLD;
+
+  sendMessage(isRaining, sensorReading);
+
+  if (isRaining) {
     if (deviceMode != SOUND_OFF) {
       //Serial.println("I'm singing in the rain");
-      buzzerSound();
-    }   
+      //buzzerSound();
+    }
   }
   else {
     deviceMode = SOUND_ON;
   }
 
-  delay(1000*20); // delay between reads = 1 minute
+  delay(1000 * 20); // delay between reads = 1 minute
 }
 
 void buzzerSound() {

    delay(pauseBetweenNotes);
  }
}

const int RAIN_THRESHOLD = 700;
const int SENSOR_PIN = A0;
const int BUZZER_PIN = 2;

const int SILENCE_COMMAND = 1;

enum mode {SOUND_ON, SOUND_OFF};
