The official code that runs on the FRDM board for the chlorine sensor.

Dependencies:   MBed_Adafruit-GPS-Library SDFileSystem mbed GSM_Library

Fork of DCS by Brandon Crofts

Revision:
10:02e2f8400e87
Parent:
8:6b4a6bcd7694
Child:
14:97611177509b
--- a/Sensor.cpp	Tue Mar 24 17:57:30 2015 +0000
+++ b/Sensor.cpp	Tue Mar 24 18:39:58 2015 +0000
@@ -15,7 +15,7 @@
 bool run = 0;
 Serial gsm(D1,D0);
 
-char message[5000];
+char message[MAX_MSG_SIZE];//MSG_SIZE located at GSMLibrary.h
 char num[10];
 
 /**************************************************
@@ -236,13 +236,13 @@
             
             if(gsm_ready()){
                 gsm_send_sms(message); 
-                memset(message, 0, 5000);
+                memset(message, 0, MAX_MSG_SIZE);
                 buffer = 0; 
             }else{
-                buffer++;
-                if(buffer > 12){
+                buffer++;   //if msgsize is 150, then 150 * 6 = 900 (max SMS length)
+                if(buffer >= 6){ //Thus only allow 6 data points to be sent at once
                     buffer = 0;
-                    memset(message, 0, 5000);    
+                    memset(message, 0, MAX_MSG_SIZE);    
                 }
             }