give example to use GPRS Shield library
Fork of GPRS_Shield_Test by
Diff: main.cpp
- Revision:
- 2:3b735ebe88b0
- Parent:
- 1:65d3c8a4a166
- Child:
- 3:e07b56b8b637
--- a/main.cpp Fri Nov 15 03:53:07 2013 +0000 +++ b/main.cpp Mon Nov 18 07:48:07 2013 +0000 @@ -12,35 +12,35 @@ #define IP_ADDRSS "42.96.164.52" #define PORT "80" -gprs gprsTest(P0_19, P0_18, 115200, "10086"); +GPRS gprsTest(P0_19, P0_18, 115200, "10086"); int main(void) { - if(0 != gprsTest.init()){ + if(0 != gprsTest.init()) { return -1; } - #if SEND_SMS_TEST +#if SEND_SMS_TEST gprsTest.sendSMS("10086","hello,lawliet"); //define phone number and text - #endif +#endif - #if CALL_UP_TEST +#if CALL_UP_TEST gprsTest.callUp("10086"); - #endif +#endif - #if ANSWER_TEST || READ_SMS_TEST +#if ANSWER_TEST || READ_SMS_TEST gprsTest.loop(0); - #endif - - #if TCP_TEST +#endif + +#if TCP_TEST gprsTest.connectTCP(IP_ADDRSS,PORT); gprsTest.sendTCPData("hello,lawliet test"); - #endif - - #if SERIAL_DEBUG +#endif + +#if SERIAL_DEBUG gprsTest.serialDebug(USBTX,USBRX); - #endif - +#endif + return 0; }