You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
I saw your sendSMS function and was wondering if your initialization condition is false or not. Here is your code :
`
void setup() {
Serial.begin(9600);
while (0 != gprsTest.init()) {
delay(1000);
Serial.print("init error\r\n");
}
Serial.println("gprs init success");
Serial.println("start to send message ...");
gprsTest.sendSMS(PHONE_NUMBER, MESSAGE); //define phone number and text
}
`
I see here that your condition is waiting for a 0, or a false in the gprs.init() method.
But if we go to your GPRS_Shield_Arduino.cpp file, we see that the function returns true if everything went well. Why do you wait for a false to say if the initialization was successful ? Here is the code :
`
int GPRS::init(void) {
if (0 != sim900_check_with_cmd("AT\r\n", "OK\r\n", CMD)) {
return false;
Hi,
I saw your sendSMS function and was wondering if your initialization condition is false or not. Here is your code :
`
void setup() {
}
`
I see here that your condition is waiting for a 0, or a false in the gprs.init() method.
But if we go to your GPRS_Shield_Arduino.cpp file, we see that the function returns true if everything went well. Why do you wait for a false to say if the initialization was successful ? Here is the code :
`
int GPRS::init(void) {
if (0 != sim900_check_with_cmd("AT\r\n", "OK\r\n", CMD)) {
return false;
}
`
Is there anything I have misunderstood ?
Best regards.
The text was updated successfully, but these errors were encountered: