Go Down

Topic: sim900 not working  (Read 477 times) previous topic - next topic

jbtandearvolt

good day.

i uploaded a code to the micro controller with gsm shield(sim900) and the micro-controller is not responding any single text.

#include "SIM9OO.h"
#include "sms.h"
SMSGSM sms;
char number [] = "+639........";
char pos;
int buzzer = 7;
int pir = 8;
int pirState = LOW;
int val = 0;

void setup ()
{
Serial.begin(9600);
pinMode (buzzer, OUTPUT);
pinMode (pir, INPUY);
}

void loop ()
{
val = digitalRead(pir);
if (val == HIGH) {
digitalWrite (buzzer, HIGH);
send.SendSMS ("+639.....", "motion detected");
if (pirState ==LOW) {
pirState = HIGH;
}
}
if (val == LOW) {
digitalWrite (buzzer, LOW);
if (pirState == HIGH) {
pirState = LOW;
}
}
}



 

Go Up