warning device

hi, i would create a warning device for my house using arduino.. my idea is to make send from GSM shield a message to my phone once the sensors notice moviments without internet connection, but i dont know how to do... can anyone help me with the program please??

Spent some time through the sketches in the tutorial section. There is a lot of code there that can be useful for your project and you will learn the ins and outs of the arduino language step by step.

i already do, but i just can not :frowning: nobody can help me? do i need internet connection to make gsm send messages?

You can send text messages by gsm directly.

cornuto2:
i already do, but i just can not :frowning: nobody can help me? do i need internet connection to make gsm send messages?

On this forum many volunteers learn people how the Arduino works and learn them to how to create their project. Seldom a complete solution is offered - OK you can post in the gigs section and pay for someone's time.

You said you already went through the tutorials, maybe you can post the code you have created so far, so we have something concrete to work with.

okok sorry.. anyway i did this sketch but i do not know if it's right

#include <SoftwareSerial.h>
SoftwareSerial SIM900(7, 8);
int x,y;
String textForSMS;


int sensor;

void setup()
{
  SIM900.begin(19200);

    Serial.begin(9600);
  }
  
void sendSMS(String message)
{
  SIM900.print("AT+CMGF=1\r");                     
  delay(100);
  SIM900.println("AT + CMGS = \"+12128675309\"");  
  delay(100);
  SIM900.println(message);                        
  delay(100);
  SIM900.println((char)26);                       
  delay(100); 
  SIM900.println();
  delay(5000);                                     
}

void loop()
{
  int sensor = analogRead(A0);
  Serial.println(sensor,DEC);
  if(sensor<=950)
  {
  x = random(0,255);
  y = random(0,255);
  textForSMS = "Your random numbers are ";
  textForSMS.concat(x);
  textForSMS = textForSMS + " and ";
  textForSMS.concat(y);
  textForSMS = textForSMS + ". Enjoy!";  
  sendSMS(textForSMS);
  do {} while (1);
  }
  }

do i wrong something?

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.