GSM library for nucleo L152RE
Dependencies: Adafruit_GSM
GSM_Wrapper.h@1:9e13d8a84808, 2015-12-05 (annotated)
- Committer:
- ptcrews
- Date:
- Sat Dec 05 07:29:49 2015 +0000
- Revision:
- 1:9e13d8a84808
- Child:
- 3:922cf54e97ec
GSM library for the full project.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ptcrews | 1:9e13d8a84808 | 1 | #include "Adafruit_FONA.h" |
ptcrews | 1:9e13d8a84808 | 2 | #include "main.h" |
ptcrews | 1:9e13d8a84808 | 3 | |
ptcrews | 1:9e13d8a84808 | 4 | #ifndef _GSM_WRAPPER_CLASS |
ptcrews | 1:9e13d8a84808 | 5 | #define _GSM_WRAPPER_CLASS |
ptcrews | 1:9e13d8a84808 | 6 | |
ptcrews | 1:9e13d8a84808 | 7 | class GSM_Sensor { |
ptcrews | 1:9e13d8a84808 | 8 | public: |
ptcrews | 1:9e13d8a84808 | 9 | GSM_Sensor(): fona(FONA_TX, FONA_RX, FONA_RST, FONA_RI), key(FONA_KEY) {} |
ptcrews | 1:9e13d8a84808 | 10 | void changePowerState(); |
ptcrews | 1:9e13d8a84808 | 11 | void setup(); |
ptcrews | 1:9e13d8a84808 | 12 | bool send(uint8_t* data, size_t size); |
ptcrews | 1:9e13d8a84808 | 13 | private: |
ptcrews | 1:9e13d8a84808 | 14 | bool sendOverHTTP(char* url, uint8_t* data, int dlength); |
ptcrews | 1:9e13d8a84808 | 15 | Adafruit_FONA fona; |
ptcrews | 1:9e13d8a84808 | 16 | DigitalOut key; |
ptcrews | 1:9e13d8a84808 | 17 | }; |
ptcrews | 1:9e13d8a84808 | 18 | |
ptcrews | 1:9e13d8a84808 | 19 | #endif |