The GSM/GPRS & GPS Shield: some Http connections examples

By on June 11, 2013
Pin It

Download_GSM_library

After having shown several examples regarding the use the  GSM/GPRS & GPS shield with calls and text messages we are now going to present some applications that involve GPRS data.

Thanks to the inet.h class the shield can indeed connect to the internet and its various applications. We ‘ll see how to use the Arduino as a client requesting a web page, or as a server for receiving commands and, finally, how to send emails

 gsm-shield-FT900_s

EXAMPLE 1

Before describing this example, let’s recall what happens when you open the browser and request a page.

As a result of this, the browser establishes a TCP/IP connection with a web server (that can be identified by its IP address or by a string such as www.open-electronics.org thanks to the DNS service) and sends a request for the related page. This request is called ‘http request’ contains basic information as well as the path where you the page that we want to display is stored. Usually the path coincides with everything that comes after the domain suffix (in the case you wanted to access our about page, the path is www.open-electronics.org/about).

The server receiving the request checks for the page you requested and returns a first response with the outcome of the research (in case of page not found you have the classic ‘404 Error‘) and further information such as the GMT time set on the server or the last change to the page.

 

Following this response, if the research had positive results, the server will pass on the HTML code of the browser to display: the browser will then interpret the code and generate the page as we are used to see that.
You can replicate this process (except for the HTML rendering) thanks to our shield and its associated library.
In this sketch we will deal with a specific page request (Google’s search engine home), with analyzing the response, and extrapolate GMT.
Let’s look at the code.
For the sake of simplicity we chosen to include the data connection activation phase in the sketch setup.
Such a choice is not mandatory, but was preferred for clarity reasons, emphasizing the real part of the program within the loop function.







So in the setup, after initializing the shield, it will run the initialization routine of the mobile data network. For this operation, we simply invoke the following function:

inet.attachGPRS(char* APN, char* username, char* password)

In the examples you will find the function setup as if you were using the Italian operator called Wind.
Also the connection request to the server, being performed only once, has been included in the setup.

That call asks the server the page on the path defined by the third parameter through the specified port. The last two parameters are used to store inside the string passed with the fourth parameter, the entire response or any part of it, the length of which is defined by the last parameter.

 

The function returns the number of characters stored.

inet.httpGET(“www.google.com”, 80, “/”, msg, 50);

In this way, the first 50 characters of the answer will be saved in the msg variable. This has no purpose in this example and is performed only for demonstration purposes. You can set this parameter to 0.

It’s important the portion of the text that we want to analyze (the one containing the date and time) does not fall between characters saved, because we will control the remaining ones. In this case the first 50 characters are used by the server to communicate further information.

Let’s now try to understand what happens to the remaining part of the response that is not saved.
The library involves the use of a buffer of a size, defined within the library, that can be set at will. This buffer is used to temporarily store any communication from the SIM900 on the serial software port module, including server responses. Through the gsm.read () command you can read (if any) the first data (the oldest in the arrival order) stored on the buffer.

If the buffer is empty, it will return the 0 value (note that it is different from the value ‘0’ in ASCII encoded with the number 48).

So at each loop cycle we will read the first value in the buffer.

data=gsm read();
if(data>0){ […] }

Once verified that within the given variable a non-zero exists, we will proceed with the search for the string. The string containing the date and time is preceded by the text “Date:“. We’ll then take care of finding the value, and once identified, store the remaining characters, up to the ‘\n’ character .

The string recognition algorithm is very simple: each character is compared with the first of the searched string (in this a capital D), and in case of correspondence we increasing a counter variable, and communicate that to the next iteration of the algorithm that will no longer compare with the first character, but with the second instead. Similarly, for the next, until the number of positive matches (contained within the varaiabile counter k) is not equal to the length of the word you’re waiting for.

In case of a different intermediate character, the algorithm will reset starting again to search for the first value of the expected string. If the required word is found, the algorithm is reset and a boolean variable named found, is set to true. At this point in time we just have to print to screen all subsequent values ​​of the response, until ‘\n’ (end of the line).

 gsm-shield-TDGGSM_900_s

EXAMPLE 2

Often, webpages have forms to allow the user to send data through the browser. This data can be sent clear or encrypted for security issues . The simplest methods for sending clear text are GET and POST.







GET method uses the path for sending data. An example can be trivially searching on a search engine. The base address of Google is www.google.it (note that for the main pages there is no path to specify), but search Urls like this https://www.google.it/search?q=open-electronics&oq=open-electronics&ie =UTF-8 contain, within the path, the word we searched for:”open-electronics.”

This is because the GET method passed this parameters to the page of the server that performs the search through the path.

Nothing is easier than to carry out a web research from the shield: using the same function previously presented and suitably choosing the correct path.

inet.httpGET(“www.google.com”, 80, “/search?q=open-electronics&oq=open-electronics&ie=UTF-8”, msg, 50);

 

The POST method is designed to avoid communicating data in visible manner by hiding the parameters into the header of the HTTP request. HttpPost function belonging to the InetGSM class that will do this:

inet.httpPOST(char* server, int port, char* path, *char param, *char risposta, int len_risp);

As ​​you can see it very similar to GET: in addition you just specify the parameters with a specific string and these will not appear in the link. Let’s show how to make a program that communicates data via POST method to a PHP web page on a server that provides an answer.
First, let’s see the PHP code of the serving page. Not being a topic directly related to this blog we’ll not describe it in details. Its purpose will be to receive the data, such as name and age, using the POST method and generate a personalized welcome message.

 

<?php

if( $_POST[“name”] || $_POST[“age”] )

{

   echo “Welcome “. $_POST[‘name’]. “<br />”;

   echo “You are “. $_POST[‘age’]. ” years old.”;

   exit();

}

?>

<html>

<body>

<form action=”<?php $_PHP_SELF ?>” method=”POST”>

 

Name: <input type=”text” name=”name” />

Age: <input type=”text” name=”age” />

 

<input type=”submit” />

</form>

</body>

</html>

 

Now, starting from the previous example, we just have to replace the function for connecting to the server and remove the part for date and time search. Once the sketch is loaded, we can see from the Arduino serial output the following print:

Welcome Marco <br /> You are 24 years old.

The <br/> characters are part of the HTML code and are interpreted by the browser as a ‘head’. The library does not provide for the interpretation of the HTML code, then, on the serial port you’ll see all the code for the page. Such an application is useful when you want to monitor the course of remote sensors by saving the measurements at predetermined intervals. The use of a server for such a task is very adequate and of simple configuration. Thanks to these examples you can pass parameters to the sever in the way you prefer and develop a variety of applications: from simple data collection to tweeting.

 

SOFTWARE NEWS

With the latest version of the library, version 3.05 at the time of this writing, several new features have been added including some of considerable importance with regards to sending emails.
Through these new functions, you can send email using most email providers. Having all based on Arduino, a device with limited resources, we support all providers that do not require a secure connection using SSL.
Sending email requires two functions. The first allows, once the parameters of our email accounts are set, to login and to initialize a message defining the recipient and subject.
Following this transaction, the SimpleWrite function helps define the text body.

Once the body is closed by calling the function closemail, you may send the email.

Example:

 

inet.openmail(“smtp.email.it”, “userbase64”, “passbase64”, “prova@email.it”,” info@open-electronics.org”, “This is the object”);

gsm.SimpleWrite(“This is the body”);

inet.closemail();

int openmail(char* server, char* loginbase64, char* passbase64, char* from, char* to, char* subj)

To initialize an email. The first

parameter is a string containing the smtp server you will use to send the message. Following are the username and password in base64. From field is usually required to be the owner of the email that we are using. The last two parameters are the intended recipient and the subject of the message. Once you call this function, the module will wait for the body of the message until the function is called to close and send.

On success, the function returns 1, otherwise 0.

inet.openmail(“smtp.email.it”, “userbase64”, “passbase64”, “prova@email.it”,” info@elettronicain.it “, “Questo è l’oggetto”);

int closemail()

After typing the message text, this function is called to close the email and send it.

If successful, returns 1, otherwise 0.







inet.openmail(“smtp.email.it”, “userbase64”, “passbase64”, “prova@email.it”,” info@elettronicain.it “, “Questo è l’oggetto”);

gsm.SimpleWrite(“Questo è il corpo del messaggio”);

inet.closemail();

 send email

EXAMPLE 3

Let us now see a simple example that uses the new functions. We will use this example to show some other functions from the library for those who missed the first few posts where the shield was presented. For this program sketch we will establish a basic communication with the module so you can communicate with it simply through the Arduino Serial Monitor. For this purpose it is necessary that each command sent on the serial hardware from the PC to the Arduino is forwarded to the software serial port. The latter communicates with the Arduino, and vice versa for the answers.

For this you simply insert in the loop the two functions:

serialhwread ();
serialswread ();

The first ensures any data read from the serial hardware (the one between PC and Arduino) is forwarded to the SIMCOM module, the second ensures also the reverse is true: every character sent from the module to the Arduino is forwarded to the serial hardware port.

To do a simple test is sufficient, once the sketch is loaded and started, and the initialization phase is completed, to send the “AT” command and wait for the “OK” response from the module. By this way you can communicate directly with the module with AT commands.

Sometimes you need to send a terminator character, which can not be sent via serial, then within the function serialhwread () there is a control that recognizes the “/END” command and sends the terminator character to the module.
We will use this commands interpretation system to send emails.

Indeed, in the case a “MAIL” message is sent from the PC over serial, Arduino will send an email with the pre-set parameters. It is left to the reader, if interested, to modify one of the examples we’ve seen in previous episodes to automatically send an email when a certain condition is verified on the inputs of Arduino inputs. For the base 64 encoding and decoding of username and password you can use one of several tools available from on the internet. One of the many is http://www.base64decode.org/ to convert an ASCII strings in base 64.

About Boris Landoni

Boris Landoni is the technical manager of Open-Electronics.org. Skilled in the GSM field, embraces the Open Source philosophy and its projects are available to the community.

60
Leave a Reply

avatar
34 Comment threads
26 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
43 Comment authors
Phillip Michael TrautHanz MarínAshwini GunjalWeam saaydhMarco Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Marcos Olivos Trujillo
Guest
Marcos Olivos Trujillo

with –> inet.attachGPRS(char* APN, char* username, char* password) <– running.
What happen if the module receive a sms or a call is coming?
Internet is lost, or sms and call is rejected?
thanks, regards.

Marco Martines
Guest
Marco Martines

Interesting question. I never tried. I let you know as soon as possible.
Regards, Marco

tracesol.com
Guest
tracesol.com

I have not test it yet, but you could disable incoming call with AT+GSMBUSY=1 and, when the data request has finished, enable it with AT+GSMBUSY=0
Regards, Ruben.

Ivo
Guest
Ivo

Hello,
is it possible to send sensor via Internet with this shield

BorisLandoni
Guest
BorisLandoni

yes of course.

John
Guest
John

How? If I put in the POST string

name=Marco&age=24&id=67&friend=Sandra&random=”+randNumb
er

It doesn’t work. it’s just blank. Any suggestions how to include the variables in the POST?

BorisLandoni
Guest
BorisLandoni

But where? You have to check your cloud.

Shahadat Hussain Parvez
Guest
Shahadat Hussain Parvez

How to send data stored in a variable?

Ivo
Guest
Ivo

I mean sensor data

javier torres
Guest
javier torres

Can you use the gprs functions with sim900?

BorisLandoni
Guest
BorisLandoni

Yes of course

javier torres
Guest
javier torres

Can you send UDP traffic with gprs functions?

RichiP
Guest
RichiP

I’m trying to send 2 httpPOST, but that does not work:

numdata=inet.httpPOST(“”, 80, “>path_1>”, “”, msg, 50);
delay(1000);
numdata2=inet.httpPOST(“”, 80, “>path_2>”, “”, msg, 50);

The first one is ok, but when trying to send the second, I get an error ALREADY CONNECTED.

Any suggestions?

BorisLandoni
Guest
BorisLandoni

Have you try to disconnect before send other data?

Shabeeb Ali Oruvangara
Guest
Shabeeb Ali Oruvangara

i recently bought a SIM900 GSM module. But my module doesn’t respond when using the baud rate of 2400. when i change it to 9600 the module works fine. Is there any problem on using baud rate 9600 when using http operations?

BorisLandoni
Guest
BorisLandoni

Use 9600 baud :-)

Ric
Guest
Ric

Hi there,

When I try to use the HTTP Post example, the response I get is an error saying

“HTTP/1.1 413 Request Entity Too Large”

I just copied and pasted your example and change the parameter in the attachGPRS function to suit my phone carrier.

Why is this happening to me?

Thanks.

Som
Guest
Som

Hi ,

I am able to register to network , able to make Voice call but
for GPRS if i connect using inet.attachGPRS() then it always show error.

MY APN is correct and there is no username and password.

I am able to use the same SIM withy other module and it is working fien but with my new module it’s not working.

Waiting for your help!

Thanks.

Manu
Guest
Manu

Hi I can only send one and not the following tcpip package.

nasznjoka
Guest
nasznjoka

How do I receive the data in the php side on the server side?

Ana Grossi
Guest
Ana Grossi

I had a problem when I tried to use this code… How can I fix it?

GSMSoftwareSerial.cpp.o: In function __vector_3':

C:Program FilesArduinoarduino-1.0.5librariesGSM/SoftwareSerial.cpp:305: multiple definition of __vector_3′

GSMGSM3SoftSerial.cpp.o:C:Program FilesArduinoarduino-1.0.5librariesGSM/GSM3SoftSerial.cpp:511: first defined here

GSMSoftwareSerial.cpp.o: In function __vector_4':

C:Program FilesArduinoarduino-1.0.5librariesGSM/SoftwareSerial.cpp:312: multiple definition of __vector_4′

GSMGSM3SoftSerial.cpp.o:C:Program FilesArduinoarduino-1.0.5librariesGSM/GSM3SoftSerial.cpp:518: first defined here

GSMSoftwareSerial.cpp.o: In function __vector_5':

C:Program FilesArduinoarduino-1.0.5librariesGSM/SoftwareSerial.cpp:319: multiple definition of __vector_5′

GSMGSM3SoftSerial.cpp.o:C:Program FilesArduinoarduino-1.0.5librariesGSM/GSM3SoftSerial.cpp:525: first defined here

Siddharth
Guest
Siddharth

Hi,

I found similar errors. This occurs if you have tried changing something in the library.
Try downloading the new zip file and include it in your sketch.
Should work.

Shahadat Hussain Parvez
Guest
Shahadat Hussain Parvez

Can i send Sensor data to server. I tried and can send data like “text=241”
but i couldn’t send a data stored in variable..

Please help.

Abir Imtiaz
Guest
Abir Imtiaz

could you help me with your code?

Safeer Usman
Guest
Safeer Usman

I am also facing the same problem, did you manage to send sensor data to the server. Would greatly help me for my project.

Shahadat Hussain Parvez
Guest
Shahadat Hussain Parvez

can you send me the code in email?

Brii Obrii
Guest
Brii Obrii

these examples are about how to send data, what if i want to receive data from the web?

for example: i want to turn a lamp on/off over internet

Marco
Guest
Marco

You could use the Server example and implement a simple protocol suitable for your intent. Basically it opens a TCP/IP communication and it waits for a client. Once a client is connected, it can send raw (this means you will receive the HTTP request if you use your browser as client) data you could read.

Alejandro Garcia
Guest
Alejandro Garcia

But, as a server, Arduino get an IP adress given by provider… How would the requests be sent to Arduino if IP is changing every time? Thanks for replies…

Brii Obrii
Guest
Brii Obrii

yes i have tried and successful, i have some questions for you, what if i want turn led on/off over gprs shield, meanwhile at the same time i can send the data from sensor to web? have you any clue?

Safeer Usman
Guest
Safeer Usman

I was wondering if you managed to turn the lamp on/off via the web. I am in the hunt for a solution for the same. Kindly let me know if you did it and if so how.

glenngach
Guest
glenngach

Hi´I´m having trouble connecting, I changed APN, shows like connecting but then it fails.

Evan Ramdani
Guest
Evan Ramdani

i try coding but problem if (gsm.begin(2400)){
helpm me please

Abir Imtiaz
Guest
Abir Imtiaz

use a higher baudrate! say for 9600!

uma
Guest
uma

Hi Boris Landoni, i tried your library post is working fine but get is not working well. i want to control (turn on/off) pins from web api. I have already hosted webservice on cloud. and searching for solution for a long time. what is the best way of on/off pin using gprs through web api. Please help me i’ll be very thankful to you.

robypanii
Guest
robypanii

hy master boris landoni can you help me for control LED via website use sim 900? sorry my english bad

Luiz Junior
Guest
Luiz Junior

Hi All!!

Using HttpGET and POST, i take error. This is the return of my serial, someone can help me?

ATT: OK

RIC:

OK

DB:ELSE

ATT: OK

RIC:

OK

DB:ELSE

ATT: OK

RIC:

OK

DB:ELSE

ATT: OK

RIC:

OK

DB:CORRECT BR

ATT: OK

RIC:

OK

ATT: OK

RIC:

OK

ATT: OK

RIC: ATE0

OK

ATT: OK

RIC:

OK

ATT: OK

RIC:

OK

ATT: OK

RIC:

OK

ATT: OK

RIC:

OK

ATT: +CPMS:

RIC:

+CPMS: 4,20,4,20,4,20

OK

ATT: OK

RIC:

OK

ATT: SHUT OK

RIC:

SHUT OK

status=READY

DB:ALREADY HAVE AN IP

ATT: ERROR

RIC:

ERROR

status=ATTACHED

ATT: OK

RIC:

OK

DB:RECVD CMD

ATT: CONNECT OK

RIC:

OK

ATT: OK

RIC:

STATE: PDP DEACT

CONNECT FAIL

DB:NOT CONN

ATT: OK

RIC:

ERROR

DB:NOT CONN

ATT: OK

RIC:

ERROR

DB:NOT CONN

Som
Guest
Som

Hi

I am trying to keep sending data in interval of 20 seconds , but instead of sending one record per 20 seconds, two records together getting sent at once in 40 seconds.please suggest if this is usual behavior with the GPRS or we are missing something

trackback

[…] The GSM/GPRS & GPS Shield: some Http connections examples. After having shown several examples regarding the use the GSM/GPRS & GPS shield with calls and text messages we are now going to present some applications that involve GPRS data. […]

Cameron
Guest
Cameron

Hi, I have Arduino GSM shield M10. (not SIM900) and AT&T SIM cart. I want to open a webpage like google. I tried your code but it got error. Could you please or anyone help me on that? I need the code thanks

Rahul Solanki
Guest
Rahul Solanki

While trying to fetch data from url, I get this on my serial Window. I am unable to receive any data. Can anybody help.

GSM Shield testing.

ATT: OK

RIC:

OK

DB:ELSE

ATT: OK

RIC:

OK

DB:ELSE

ATT: OK

RIC:

OK

DB:ELSE

ATT: OK

RIC:

OK

DB:CORRECT BR

ATT: OK

RIC:

OK

ATT: OK

RIC:

OK

ATT: OK

RIC: ATE0

OK

ATT: OK

RIC:

OK

ATT: OK

RIC:

OK

ATT: OK

RIC:

OK

ATT: OK

RIC:

OK

ATT: +CPMS:

RIC:

+CPMS: 1,30,1,30,1,30

OK

ATT: OK

RIC:

OK

ATT: SHUT OK

RIC:

SHUT OK

status=READY

ATT: ERROR

RIC:

ERROR

DB:STARTING NEW CONNECTION

ATT: SHUT OK

RIC:

SHUT OK

DB:SHUTTED OK

ATT: ERROR

RIC:

ERROR

DB:STARTING NEW CONNECTION

ATT: SHUT OK

RIC:

SHUT OK

DB:SHUTTED OK

status=ERROR

ERROR

ERROR

ATT: OK

RIC:

ERROR

DB:NOT CONN

ATT: OK

RIC:

ERROR

DB:NOT CONN

ATT: OK

RIC:

ERROR

DB:NOT CONN

Number of data received:

0

Data received:

ajinnadh
Guest
ajinnadh

HELLO,
I want to send some data to a web address , How can i done this….?
pls help me

Regards,

Ajinnadh

ajinnadh
Guest
ajinnadh

I currently write a script on my google spread sheet , I want to send data to this spread sheet…..

Miguel Angel Chillitupa Armijo
Guest
Miguel Angel Chillitupa Armijo

Hi… I Always have the same response:

GSM Shield testing.
DB:NO RESP
DB:NO RESP
DB:NO RESP

Trying to force the baud-rate to 9600
1200
2400
4800
9600
19200
38400
57600
115200

ERROR: SIM900 doesn’t answer. Check power and serial pins in GSM.cpp

status=IDLE

I’m working with SIM900 and I’m able to make call’s, send and receive SMS, but nothing with gprs…

Is there anything I’m missing?

Regards,
Miguel

ajinnadh
Guest
ajinnadh

Please connect the tx and rx pin on arduino pin 2,3

gsm pin tx to arduino pin 2 and gsm rx pin to arduino pin 3

Dnb Dinusha
Guest
Dnb Dinusha

it happen when the power is not inough connect external battary (lipo or some 9v battary)

Weam saaydh
Guest
Weam saaydh

I’m also having this problem. I’m using SIM908 shield. any help????

ajinnadh
Guest
ajinnadh

“smtp.email.it”, “userbase64”, “passbase64”, “prova@email.it”,” info@elettronicain.it “, “Questo è l’oggetto”

Can anybody explain what the above each means…..

Calvin
Guest
Calvin

Idk if you ever figured it out, but it goes this is a line from the library code.

int InetGSM::openmail(char* server, char* loginbase64, char* passbase64, char* from, char* to, char* subj)

1) SMTP server (google this for whatever email account you’re using
2) Username
3) Password
4) The email address you’re using to send the email
5) The email address you’re sending the email to
6) Subject of the email

ajinnadh
Guest
ajinnadh

HI calvin,

Thanks for the response ,but its showing some error as follows

RIC: 220 smtp.gmail.com ESMTP tn5sm9322549pac.32 – gsmtp

DB:NOT CONN

ATT: OK

RIC:

>

DB:NOT CONN

DB:NOT CONN

SEND OK

502 5.5.1 Unrecognized command. tn5sm9322549pac.32 – gsmtp

502 5.5.1 Unrecognized command. tn5sm9322549pac.32 – gsmtp

502 5.5.1 Unrecognized command. tn5sm9322549pac.32 – gsmtp

What may be the issue am using gmail.

calvin
Guest
calvin

@ajinnadh:disqus

I’m not really sure how to help you because I’m having problems myself. Sorry, I’m new to all of this.
What I do know is I reading somewhere and it said because of security features, gmail wasn’t a good email to use. I’m using yahoo accounts. I haven’t been able to get it working, but wherever I saw the comment about gmail, it said that yahoo was better.
Sorry, not sure if that will help or not.

Michael Kimollo
Guest
Michael Kimollo

When I use google.com to make POST request it works fine, but when I specify the server to where I want the sensor data to go it does’nt work!! The last 4 line of the serial monitor displays: Any clue please? @BorisLandoni:disqus

DB:>
ATT: SEND OK
RIC:
SEND FAIL

Muhammad Azeem Uddin
Guest
Muhammad Azeem Uddin

I need a GSM device so that when I remotely give a special text message to the device, it reply me with readings (from the sensors attached to it) on the sender number.

BorisLandoni
Guest
BorisLandoni

You can use this shield.
You need to write the code to do what you want

Michael Kimollo
Guest
Michael Kimollo

I would like to send string of sensor data to the hosted server continously. I have a problem with using HttpPOST inside loop() method…. It is working fine when I use HttpPOST inside setup() method!! How do I use HttpPOST inside the loop?? Any ideas??@BorisLandoni:disqus

helena
Guest
helena

Hi,
My sim900 sends sms to another phone,
But when is comes to sending data to internet, it does not work. I already enter apn parameters, and I have successed sending data to internet before,
Now it does not work, I check my data packet of sim card also,
What may be the problem?

Marco
Guest
Marco

Hi, I have a problem, i don’t have anwer form gsmGET when i try with google and also with wiki like in the example… any suggestion?

GSM Shield testing.

status=READY
TEST
status=ATTACHED

10.75.94.53

Numero di byte ricevuti:
0

Data recived

Ashwini Gunjal
Guest
Ashwini Gunjal

post request not working

Hanz Marín
Guest
Hanz Marín

Hi Open Electronics!
I just wonder what happened to the arduino codes, they are codified and may be confusing if someone is trying to experiment with the functionalities of this module.

Phillip Michael Traut
Guest
Phillip Michael Traut

I seem to be unable to send dynamic data to my server/database via sim 900. This is the line: Gsm.println(“AT+HTTPPARA=”URL””http://xxx.xxx.xxx.xxx:230/data.php?value = temp”””); The database stores ‘temp’ instead of the data it represents. I am usin Arduino uno. If anybody can help me solve this problem I would be most pleased