GSM shield problem can't send SMS (DEBUG: SMS TEST)

Hope someone will help me.

Why am I getting this message in the terminal?

Here’s my code

#include "SIM900.h"
#include <SoftwareSerial.h>
#include "sms.h"
SMSGSM sms;
char number[]="09108690901";
char message[40];

const int buttonPin = 2;
const int buttonPin1 = 4;
const int buttonPin2 = 6;
const int ledPin = 12;
const int ledPin1 = 13;
const int ledPin2 = 11;
const int buzzerPin = 8;
// the number of the LED pin

// variables will change:
int buttonState = 0;
int buttonState2 = 0;
int buttonState3 = 0;

void setup() {
  Serial.begin(19200);
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);   
  pinMode(ledPin1, OUTPUT);
  pinMode(ledPin2, OUTPUT);
  pinMode(buzzerPin, OUTPUT);  
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT_PULLUP); 
  pinMode(buttonPin1, INPUT_PULLUP);
  pinMode(buttonPin2, INPUT_PULLUP);  
}
void loop(){
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH  && buttonState2 == LOW) {     
    // turn LED on:    
    digitalWrite(ledPin, HIGH);
    Serial.println("Alert Level 1!");
delay(150);
 message[0]='\0';
   strcat(message,"WARNING ALERT LEVEL 1!");
   sms.SendSMS(number,message);
  } 
  else {
    // turn LED off:
    digitalWrite(ledPin, LOW); 
  }
  buttonState2 = digitalRead(buttonPin1);
  if (buttonState2 == HIGH  && buttonState3 == LOW) {     
    // turn LED on:    
    digitalWrite(ledPin1, HIGH);
  Serial.println("Alert Level 2!");  
delay(150);  
} 
  else {
    // turn LED off:
   
    digitalWrite(ledPin1, LOW); 
  }
  buttonState3 = digitalRead(buttonPin2);
  if (buttonState3 == HIGH) {     
    // turn LED on:    
    digitalWrite(ledPin2, HIGH);
    digitalWrite(buzzerPin, HIGH);
  Serial.println("Alert Level 3!");  
 delay(150);
  } 
  else {
    // turn LED off:
   
    digitalWrite(ledPin2, LOW); 
    digitalWrite(buzzerPin, LOW);
  }
}

Why am I getting this message in the terminal?

Presumably because the switch, that you have wired some mysterious way, is changing state.

Why are YOU expecting to not see those messages? Or, why are you expecting to see something else? How are the switches wired?

Noobies94: Hope someone will help me.

Why am I getting this message in the terminal?

::::
    Serial.println("Alert Level 1!");
::::

Noobies94,

  • Alert Level 1! is in your code. See above where it says Serial.prinln("Alert Level 1!");
  • DEBUG:SMS TEST is likely in your library. There is likely a switch in the code to turn it off.

Jesse

Thanks for all your reply guys :D