problem with temperature sensor and wifi-shield

Good day everyone,

I am encountering a problem with the following setup:

-Arduino UNO Rev3
-Arduino WIFI Shield
-Temperature sensor (the one of the starter kit edition) wired to A3.

After having sent the temperature information through an http request to my web server, the A3 pin begins to read unexpectedly high voltage values (around 3.5 instead of more normal about 0,75). This translates obviously into incorrect temperature readings.

I wish to specify that:

  • everything works fine at any cycle (temperature is correctly sensed) until the http request is sent (i.e. it is called every 60 seconds).
  • standalone the air temperature sensor works great and consistently.
  • same wise the repeated stand alone http request works great.

Simply the A3 pin on wifi-shield start reading higher voltage after posting the first value (which is by the way correctly read)... do I need to add any resistor anywhere?

Is there any quick or known reason for this, before I start posting long lines of code?

thank you for your consideration,

Time to post your code as so far I do not have any clue.

How is everything powered?

if you replace the temp sensor with a potentiometer do you get same problems?

Dear Rob,

thanks for your answer.

Actually it is a very good idea try checking with a potentiometer. I will check this one out first, and then I will revert you back in any case, including the code.


Dear Rob,

actually with the potentiometer, apart one mysterious flaw at the beginning (happened only once), everything seems working quite fine! I mean that the at every set cycle the voltage is read, and the data sent over the server, without crazy or wrong reading.

Would this be enough to state the TMP sensor I'm using is somehow corrupted? Strange fact is that if I exclude the http function, it works correctly...

I am posting you here the loop code, I am trying to use only "no delay" functions...
At the actual status... it is a program to read every 15 seconds the air temperature, and send this data to the web every 30 seconds...

airtemp is a float global variable. Every time the float function readAirTemp() is called, a new measurement of airt temperature is done returning a value: airtemp keeps the returned value. The hpptRequest() and readAirTemp() functions are defined later on in the code, after the void() function.

/* ---- VOID LOOP START ---- */

void loop() {
  // if there's incoming data from the net connection.
  // send it out the serial port.  This is for debugging
  // purposes only:
 while (client.available()) {
    char c =;

/* ---- real program starts here ---- */

  // if 15 seconds have passed since last air temeprature measurement,
  // then measure air temperature.
  if (millis() - lastAirTempTime > AirTempMeasureInterval) {
    airtemp = readAirTemp();

  // if 30 seconds have passed  since last connection,
  // then connect again and send data:
  if (millis() - lastConnectionTime > postingInterval) {

Serial.print("value of airtemp "); 
/*for debugging purpose: serial printing airtemp global variable value to to monitor its evolution at every cycle*/ 

/* ---- VOID LOOP END ----*/

However I decided I want to try with a different TMP sensor, and I happen to have the DHT11 with me. Tough I am struggling with a new problem. the compiler states 'dht11' does not name a type'. Weird because I apparently saved the library (folder DHT11 in libraries) including the 2 files... but this is a new problem...

after installing a new library you need to close all instances of the IDE.
Then it should appear in the menu ... File-> Examples -> DHT11

Thank you again Robert

Actually I've been spending 2 days trying to sort this one out... (and I feel pretty silly on this one) but I've been reading tutorials and trying to figure out all possible problems importing libraries (actually I've been importing them before)... but still, the DHT11 doesn't appear in Files->Examples.Only in Sketch->ImportLibrary.

In any case, after several import, quit and restart the example sketch to read the sensor is still not working because of the 'dht11' does not name a type message.

May it be a problem of IDE version?
Mine is 1.0.5

Being a Mac user I have also tried to copy/paste from the playground the .h and .cpp files into Mac Vim ( a c compiler) instead of the text editor to avoid any potential alteration of the file extension... tough no results.

Hi Rob,

just to say I found where my mistake was, and now I can compile importing the dht11 library.

No problem any more with the wifi shield (tough the DHT11 utilises a digital pin instead of an analog).
I will test in the close future with others analog sensors and check out with a similar sketch if I do find the same problem.

And... thank you, you did a great job with the DHT11 library!