Hello all
The following code cannot be uploaded on Mega. Uploading process sticks unless the last two lines of code are commented.
Can anybody help on this?
I tried it on Stalker and uploading process works fine.
Also,
...sendSMS() method should return false on success and true on error....but its always true, even if sms is not sent.
include
include
define PHONE_NUMBER "+xxxxxx83314"
define MESSAGE "Testing..."
GPRS gprsTest(10,8,19200);//RX,TX,BaudRate connected on Seeeduino Mega
void setup()
{ Serial.begin(19200);
while (!Serial.available()) {Serial.println ("press key...");}
if (!gprsTest.checkPowerUp())
{gprsTest.powerUpDown(9);} //POWER UP shield
while(!gprsTest.init())
{Serial.print("init error\r\n");
delay(1000);}
Serial.println("init success");
Serial.println("start to send message ...");
if (!gprsTest.sendSMS(PHONE_NUMBER,MESSAGE)) //define phone number and text
{Serial.println("SMS send OK"); }
// else //<<<<
// {Serial.println("ERROR SENDING SMS!!!"); } //<<<<
}
Hello all The following code cannot be uploaded on Mega. Uploading process sticks unless the last two lines of code are commented. Can anybody help on this? I tried it on Stalker and uploading process works fine. Also, ...sendSMS() method should return false on success and true on error....but its always true, even if sms is not sent.
include
include
define PHONE_NUMBER "+xxxxxx83314"
define MESSAGE "Testing..."
GPRS gprsTest(10,8,19200);//RX,TX,BaudRate connected on Seeeduino Mega void setup() { Serial.begin(19200); while (!Serial.available()) {Serial.println ("press key...");} if (!gprsTest.checkPowerUp()) {gprsTest.powerUpDown(9);} //POWER UP shield while(!gprsTest.init()) {Serial.print("init error\r\n"); delay(1000);} Serial.println("init success"); Serial.println("start to send message ..."); if (!gprsTest.sendSMS(PHONE_NUMBER,MESSAGE)) //define phone number and text {Serial.println("SMS send OK"); } // else //<<<< // {Serial.println("ERROR SENDING SMS!!!"); } //<<<< }
void loop() {}