this is a demo code for you to update sensor data to xively by using GPRSInterface library

Dependencies:   GPRSInterface libxively mbed

Fork of Seeed_GPRS_Xively_HelloWorld by wei zou

Revision:
2:aed4fdb82b45
Parent:
1:4d9cf9cad247
--- a/main.cpp	Fri Feb 28 02:42:40 2014 +0000
+++ b/main.cpp	Wed Apr 09 07:19:08 2014 +0000
@@ -3,8 +3,8 @@
 #include "xively.h"
 #include "xi_err.h"
 
-#define PIN_TX          P0_0
-#define PIN_RX          P0_1
+#define PIN_TX          P0_19
+#define PIN_RX          P0_18
 #define XI_FEED_ID      571464242 // set Xively Feed ID (numerical, no quoutes)
 #define XI_API_KEY      "niUYuSJkjqyzPFwnWqpApm7lLNv8fInUD6ijAoRrikqKFWbg" // set Xively API key (double-quoted string)
 
@@ -17,10 +17,10 @@
     // attempt DHCP
     while(false == gprs.connect()) {
         wait(2);
-        printf("gprs connect error\n");
+        //printf("gprs connect error\n");
     }
     // successful DHCP
-    printf("IP Address is %s\n", gprs.getIPAddress());
+    //printf("IP Address is %s\n", gprs.getIPAddress());
 
     xi_feed_t feed;
     memset( &feed, NULL, sizeof( xi_feed_t ) );
@@ -44,7 +44,7 @@
     while(1) {
         xi_set_value_f32(current_sound, soundSensor.read());
         xi_feed_update( xi_context, &feed );
-        printf("update success\n");
+        //printf("update success\n");
         wait( 10 );
     }
 }
\ No newline at end of file