#include "SIM900.h"
#include <SoftwareSerial.h>
#include "inetGSM.h"
#include <SHT1x.h>
#define dataPin 10
#define clockPin 11
SHT1x sht1x(dataPin, clockPin);
InetGSM inet;
int k = 0;
int j = 0;
char msg[150];
boolean found = false;
char data;
int numdata;
char inSerial[50];
int i = 0;
boolean started = false;
void setup()
{
Serial.begin(9600);
Serial.println("Arduino Started");
/*
if (gsm.begin(2400)) {
Serial.println("\nstatus=READY");
started = true;
}
else Serial.println("\nstatus=IDLE");
if (started) {
if (inet.attachGPRS("internet", "wap", "wap123"))
Serial.println("status=ATTACHED");
else Serial.println("status=ERROR");
delay(1000);
}
*/
};
void loop()
{
int suhu;
int temp_c;
int temp_f;
int humidity;
temp_c = sht1x.readTemperatureC();
temp_f = sht1x.readTemperatureF();
humidity = sht1x.readHumidity();
inet.httpPOST("andi.pcr.ac.id", 80, "/tessuhu.php", "cahaya=[COLOR="#FF0000"]1000[/COLOR]&kelembaban=[COLOR="#FF0000"]70[/COLOR]&suhu=[COLOR="#FF0000"]30[/COLOR]", msg, 50);
serialswread();
delay(3600000);
};
void serialswread() {
gsm.SimpleRead();
}