September 2018: You could buy a humidity and temperature sensor breakout from Sparkfun for $7, plus p&p.
And it is easy to use.
Once you install Sparkfun's library, the code boils down to....
#include "SparkFun_Si7021_Breakout_Library.h"
#include <Wire.h>
float humidity = 0;
float tempf = 0;
Weather sensor;
//-------------------------------
void setup()
{
Serial.begin(9600);
sensor.begin();
}// End of setup()
//-------------------------------
void loop()
{
getWeather();
printInfo();
delay(1000);
}//End of loop()
//-------------------------------
void getWeather()
{
humidity = sensor.getRH();
tempf = sensor.getTempF();
}//End of getWeather()
//-------------------------------
void printInfo()
{
//This function prints the weather data out to the default Serial Port
Serial.print("Temp:");
Serial.print(tempf);
Serial.print("F, ");
Serial.print("Humidity:");
Serial.print(humidity);
Serial.println("%");
}//End of printInfo()
A few minor "pay attentions" to notice... not "problems", unless you fail to notice...
Don't, by the way, be scared by the I2C. I know little about it, but had no problems. Be sure you connect SDA and SCL to the right pins on whatever microcontroller you are using.
The code of a webserver in an 8266 ($16... programmed with Arduino IDE)... is available. See my discussion of creating an inexpensive webserver ($16) to report data from sensors.
If you visit 1&1's site from here, it helps me. They host my website, and I wouldn't put this link up for them if I wasn't happy with their service.
Click here to visit editor's Sheepdog Software (tm) freeware, shareware pages.. Material on this page © TK Boyd qDATE
Click here to visit the homepage of my biggest site.
Click here to visit the homepage of Sheepdogsoftware.co.uk. Apologies if the "?FrmAht" I added to that link causes your browser problems. Please let me know, if so?
Page WILL BE tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org
....... P a g e . . . E n d s .....