Prototyping the Adaptable Emergency System on an C027 board.

Dependencies:   C027_Support mbed

Fork of c027_prototyping by Philémon Favrod

Revision:
13:3c1f0b8c1d21
Parent:
7:eeef6f9fa1db
Child:
15:41e3e4613e34
--- a/main.cpp	Tue Sep 30 18:05:23 2014 +0000
+++ b/main.cpp	Tue Sep 30 18:24:49 2014 +0000
@@ -1,11 +1,23 @@
 #include "mbed.h"
 #include "gps_locate.h"
+#include "sms_lib.h"
 
 int main() {
     printf("Hello here is the position: ");
     struct gps_data_t gps_data;
     gps_locate(&gps_data);
     printf("https://maps.google.com/?q=%.5f,%.5f\n", gps_data.la, gps_data.lo);
+    
+    struct sms_data_t sms; 
+    sms.phone_num = "+41774084185";
+    sms.msg_buf = "Je suis une carte u-blox. Tu veux etre mon ami ?";
+    printf("Now I will send a SMS\n");
+    send_sms(&sms);
+    
+    sms.phone_num = new char[32];
+    sms.msg_buf = new char[256];
+    while(!read_sms(&sms));
+    printf("Received sms from %s:\n%s\n", sms.phone_num, sms.msg_buf); 
     printf("End");
     return 0;
 }