Had a breakthrough with this project, rather than use DDNS which I would have to pay for from DynDNS I have found a better solution.  The Avviso library for arduino (http://avvisoapp.com/) manages the sending of notifications to either prowl for Iphone or notify my android for Android.  Using the sample code it works fine, had to pay £3.50 for a premium account but oh well.


  I have now added the temperature sensor in and used the One Wire library to interface between it, code can be found here http://www.hobbytronics.co.uk/ds18b20-arduino, it is a DS18B20 digital Temparature sensor.  After fixing a problem with the code were float variables could not be sent out, I finalized this code:

void loop() {
  if (counterValue > 0) {
    if (DEBUG) Serial.println(counterValue);
    counterValue--;
    delay(300);
  } else if (counterValue == 0) {
    counterValue--;
    if (DEBUG) Serial.print("Sending push notification...");
    sensors.requestTemperatures(); 
    char buf[100];
    dtostrf(sensors.getTempCByIndex(0), 6, 2,buf);

Serial.println(buf);
    int returnCode = Avviso.push("The temparature is... (Degrees C)",buf, 0);
    if (returnCode == 200) {
      if (DEBUG) Serial.println("OK.");      
    } else {
      if (DEBUG) Serial.print("Error. Server returned: ");      
      if (DEBUG) Serial.print(returnCode);      
    }
  }  
}

The conversion from float to char is done through the command dtostrf(), a random command I found on the arduino forum.  Here is the first notification I recieved, telling me it is 17.19 Degrees Celsius:


Now I just need to finish the final program so the LCD screen will work and then it will be ready for action.

Comment