I want to visualise a data ( like temp,humidity etc) send by using a gsm sim 900 module to the azure web page like the image. pls click here to see image i am simply posting the data using the below arduino code.
#include <SoftwareSerial.h>
void setup()
{
Serial.begin(9600);
Serial.begin(9600);
Serial.println("Config SIM900...");
delay(2000);
Serial.println("Done!...");
Serial.flush();
Serial.flush();
// attach or detach from GPRS service
Serial.println("AT+CGATT?");
delay(100);
toSerial();
// bearer settings
Serial.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");
delay(2000);
toSerial();
// bearer settings
Serial.println("AT+SAPBR=3,1,\"APN\",\"airtelgprs.com\"");
delay(2000);
toSerial();
// bearer settings
Serial.println("AT+SAPBR=1,1");
delay(2000);
toSerial();
}
void loop()
{
// initialize http service
Serial.println("AT+HTTPINIT");
delay(2000);
toSerial();
// set http param value
**Serial.println("AT+HTTPPARA=\"URL\",\"https://my web add.php?temp=25\"");**
delay(2000);
toSerial();
// set http action type 0 = GET, 1 = POST, 2 = HEAD
Serial.println("AT+HTTPACTION=1");
delay(6000);
toSerial();
// read server response
Serial.println("AT+HTTPREAD");
delay(1000);
toSerial();
Serial.println("");
Serial.println("AT+HTTPTERM");
toSerial();
delay(300);
Serial.println("");
delay(10000);
}
void toSerial()
{
while(Serial.available()!=0)
{
Serial.write(Serial.read());
}
}
can anybody help me to write the code in azure web to see the data which i posted in real time ,No back up is need just to watch the data at the real time, i am a starter in web programming.
Regards, Ajin nadh
Aucun commentaire:
Enregistrer un commentaire