         rain_counter_reset = false ;
     }
 
-    // @todo send SMS 
-
-}
-
-void pat_watchdog() {
+#if !defined(AWS_NO_GSM)
+    gsmSerial.print("\r");  
+    micro_delay(20);
+    gsmSerial.print("AT+CMGF=1\r");
+    micro_delay(20);
+    gsmSerial.print("AT+CMGS=\"+918553518338\"\r"); 
+    micro_delay(20);
+    // pat watchdog
     wdt_reset();
+
+    gsmSerial.print("Yuktix H");
+    if(dht22_code !=  DHT_ERROR_NONE) { 
+        gsmSerial.println("ERR");
+        gsmSerial.print(dht22_code);
+        
+    } else {
+        gsmSerial.println(humidity);
+        gsmSerial.print(" T");
+        gsmSerial.print(dht22_temp);
+    }
+
+    gsmSerial.print(" P");
+    gsmSerial.print(pressure);
+    gsmSerial.print(" R");
+    gsmSerial.print(total_rain);
+    gsmSerial.println();
+    gsmSerial.write(0x1A);
+    micro_delay(100); 
+    // pat watchdog
+    wdt_reset();
+
+#endif
+
 }
 
 void calculate_rain() {

    attachInterrupt(0,isr_pin2,RISING);
    last_irq_time = 0 ;

    Alarm.timerRepeat(2,pat_watchdog);
    Alarm.timerRepeat(60,update_display);
    Alarm.alarmRepeat(8,30,0, send_bulletin);

#if !defined(AWS_NO_SERIAL)
    Serial.begin(9600);
#endif

}


    Serial.print(" P");
    Serial.print(pressure);
    Serial.print(" R");
    Serial.print(total_rain);

}
#endif
