give example to use GPRS Shield library
Fork of GPRS_Shield_Test by
Diff: main.cpp
- Revision:
- 1:65d3c8a4a166
- Parent:
- 0:53b4a13adcfb
- Child:
- 2:3b735ebe88b0
--- a/main.cpp Thu Nov 14 09:46:27 2013 +0000 +++ b/main.cpp Fri Nov 15 03:53:07 2013 +0000 @@ -2,7 +2,7 @@ #include "string.h" #include "gprs.h" -#define SERIAL_DEBUG 1 +#define SERIAL_DEBUG 0 #define SEND_SMS_TEST 0 #define CALL_UP_TEST 0 #define ANSWER_TEST 0 @@ -12,8 +12,7 @@ #define IP_ADDRSS "42.96.164.52" #define PORT "80" -#if 1 -gprs gprsTest; +gprs gprsTest(P0_19, P0_18, 115200, "10086"); int main(void) { @@ -22,17 +21,15 @@ } #if SEND_SMS_TEST - gprsTest.sendSMS("13925257382","hello,lawliet"); //define phone number and text - //gprsTest.sendSMS(); // default pone number and text + gprsTest.sendSMS("10086","hello,lawliet"); //define phone number and text #endif #if CALL_UP_TEST - //gprsTest.callUp("13925257382"); - gprsTest.callUp(NULL); + gprsTest.callUp("10086"); #endif #if ANSWER_TEST || READ_SMS_TEST - gprsTest.loop(1); + gprsTest.loop(0); #endif #if TCP_TEST @@ -41,10 +38,10 @@ #endif #if SERIAL_DEBUG - gprsTest.serialDebug(); + gprsTest.serialDebug(USBTX,USBRX); #endif return 0; } -#endif +