Hi,
I have a good working PIR sensor. I tested it with this tutorial (http://makezine.com/projects/PIR-Sensor-Arduino-Alarm/)
Problem:
When I use GSM shield and POST request PIR sensor works bad, not the way it should. Signal HIGH gets after request. When I comment POST function, it works fine.
Code:
void connectToServer()
{
//Serial.println(F("Jungiamasi prie GSM"));
if(gprs.ready())
{
// bando prisijungti
if (client.connect("securitysystem2-001-site1.myasp.net", 80))
{
//Siunciama POST uzklausa
//delay(500);
char buffer[12];
itoa(guard_status, buffer, 10);
Serial.println(F("POST"));
client.println(F("POST /TCPEndPoint.ashx HTTP/1.1"));
client.println(F("Host: securitysystem2-001-site1.myasp.net"));
client.println(F("Content-Type: application/x-www-form-urlencoded"));
client.print(F("Content-Length: "));
client.println(strlen(buffer));
client.println(F("Connection: close"));
client.println();
client.println(buffer);
Serial.print(F("Kintamasis=")); Serial.println(buffer);
Serial.print(F("SRAM=")); Serial.println(freeRam());
}
else
{
//lcd.clear();
//lcd.print("Serv:Klaida");
Serial.println(F("Neprisijungta prie serverio"));
}
}
else
{
//lcd.clear();
//lcd.print("GSM:Klaida");
connectGSM();
}
}
This is a big problem for me. 2 week trying to fix it.
Sory for bad english, I hope you understand.