Seeed-Studio / GPRS_SIM900

library for GPRS shield with sim900 module.
MIT License
138 stars 96 forks source link

Problem Uploading on Seeeduino Mega #15

Closed nexus05 closed 7 years ago

nexus05 commented 7 years ago

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() {}

lanselambor commented 7 years ago

The triple exclamation cause stuck uploading on Mega2560, this is a bug with arduino bootloader. More infomation refer to https://github.com/arduino/Arduino/issues/459.