I just received in the mail a couple of the DHT11 Humidity and Temp sensors. Before I have plugged them, I went to the arduino reference page and have uploaded & built the directory, and added the two supplied library driver files.
I reset Arduino IDE and the library is visible. When I go to compile the example code from this page however, I get a number of error issues with the compile process. The first of which is at this point in the code supplied in the library.
dht11 DHT11; ~expected constructor, destructor, or type conversion before numeric constant
I am running Arduino 1.05r2 with a Mega 256. I am under the impression this is supposed to compile and run on this combo.
As i am using example only code, with no changes to it, I am confused as to why its not at least compiling. Is anyone one else having issues with this example? I am ready to add these two new readings to the soil moisture sensor I have working at www.bammo.info for my farming monitoring project.
Any suggestions or directions as to where I can find a working example that will compile would be greatly appreciated.
Please add a link to the library you are using (just paste the url in the text).
I think you are either using Arduino 1.0.5 or 1.5.5r2, and the Arduino Mega 2560 board.
Did you use the examples that are included with the library ?
Did you install the library properly, or did you copy the files to new tabs in your project ?
EDIT: The current stable Arduino IDE is indeed 1.0.5r2. So I was wrong.
Here is the source I am using for the library. Arduino Playground - HomePage I copy and pasted each example into notepad, and saved them to a folder named DHT11 and uploaded that to my library. I resaved each file to the library again. Oddly, the error message changed. It still fails at the same spot.
dht DHT;
'dht' does not name a type
Is this an issue with uploading the library itself?
**** Found the Problem, I am an Idiot ****
I was calling the library file dht.h in the sketch, but named them DHT.h. The caps was the issue. Sorry to waste the forums time.