Full project folder
Dependencies: GPSLibrary GSM mbed-modifed Storage_Library Temp_Library Wakeup pH_Sensor
Diff: main.h
- Revision:
- 14:196ed16cd62b
- Child:
- 15:5f366ddcce18
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.h Sat Dec 05 07:36:48 2015 +0000 @@ -0,0 +1,43 @@ +#include "mbed.h" + +#define N_READINGS_PER_SEND 5 +#define N_SECONDS_SLEEP 360 + +#define TMP_ANALOG A0 + +// Global Positioning System constants +#define GPS_TX D6 +#define GPS_RX PB_11 +#define GPS_EN D7 +#define N_GPS_QUERIES 300000 +#define SEC_WAIT_FOR_FIX 60 +#define GPS_BAUD 9600 + +// pH sensor constants +#define PH_TX PC_10 +#define PH_RX PC_11 + +// Cellular communication constants +#define FONA_TX D8 +#define FONA_RX D2 +#define FONA_RST D3 +#define FONA_RI D4 +#define FONA_KEY D5 + +#define READINGSIZE sizeof(struct reading) +#define URL "http://requestb.in/1ihfre81" + +#ifndef _MAIN_H +#define _MAIN_H +struct reading { + float temperature; + float pH; + float latitude; //Signed positive if N, negative if S + float longitude; //Signed positive if E, negative if W + uint8_t day; + uint8_t month; + uint8_t year; + uint8_t hour; + uint8_t minutes; +}; +#endif \ No newline at end of file