arduino program code +gsm for industrial automation.HELP NEEDED


hello again arduino friends!! according library found i've written code simple project. need : in industrial board when power off,arduino sends message user warns him power off. want see code , tell me if correct or not. use library found in internet gsm sim900.
the code is:

#include "sim900.h"
#include <softwareserial.h>
#include "sms.h"
smsgsm sms;
boolean started=false;
int board1 = 7;

void setup()
{
  //serial connection.
  serial.begin(9600);
  pinmode(board1, input);
  serial.println("gsm shield testing.");

  if (gsm.begin(2400)){
    serial.println("\nstatus=ready");
    started=true; 
  }
  else serial.println("\nstatus=idle");
 
  if(started){
    if (sms.sendsms("+30693xxxxxxx", "sms arduino ok."))
      serial.println("\nsms sent ok");
  }

};


void loop()
{
int buttonstate = digitalread(board1);
if (board1=low)
sms.sendsms("+306932xxxxxxx", "board1 off");


}



can please tell me if code correct??if not can change work properly??i think simple project programming skill low cause beginner. thank in advance.     :) :) :)

i join in question.

actually have same problem. i´m starting arduino uno , want this. after working, to:

1- add , tft touch screen
2- write warm in sd card

can us?


Arduino Forum > Products > Arduino GSM Shield (Moderator: fabioc84) > arduino program code +gsm for industrial automation.HELP NEEDED


arduino

Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62