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
Diff: Sensor.cpp
- Revision:
- 2:5c0513ab856e
- Parent:
- 1:8614e190908b
- Child:
- 4:35d92f290cfe
diff -r 8614e190908b -r 5c0513ab856e Sensor.cpp --- a/Sensor.cpp Fri Mar 06 22:36:44 2015 +0000 +++ b/Sensor.cpp Fri Mar 06 23:14:13 2015 +0000 @@ -5,9 +5,11 @@ #include "SDFileSystem.h" #include "QAM.h" #include "param.h" +#include "GSMLibrary.h" DigitalOut led_red(LED_RED); Serial pc(USBTX, USBRX); +Serial gsm(PTC17,PTC16); Timer t; /************************************************** @@ -80,16 +82,19 @@ int main () { pc.baud(115200); + gsm.baud(115200); pc.printf("hello\r\n"); + //GSM INITIALIZATION /////////////////////////////// + gsm_initialize(); // GPS INITIALIZATION ////////////////////////////// - gps_Serial = new Serial(D1,D0); - Adafruit_GPS myGPS(gps_Serial); - char c; - myGPS.begin(9600); - myGPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA); - myGPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ); - myGPS.sendCommand(PGCMD_ANTENNA); + //gps_Serial = new Serial(D1,D0); + //Adafruit_GPS myGPS(gps_Serial); + //char c; + //myGPS.begin(9600); + //myGPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA); + //myGPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ); + //myGPS.sendCommand(PGCMD_ANTENNA); //////////////////////////////////////////////////// buildIQ(); @@ -138,8 +143,8 @@ } } - - + /* + if(sampleIndex+2 > SAMPLE_LENGTH){ //0.50 seconds sampleIndex = 0;