[Solved] what does type error mean in Arduino


About your specific bug you should

‘dht’ does not name a type

That means you have the word dht that is not at a place where the compiler could understand what you mean.

how do i change it to a type?

You do not want to change it into a type, you want to solve the compiling issue you’re getting.

what does a type mean?

You should read the K&R on the subject. A type is a rule that constraints you into making code that is coherent.

You should copy in your question the full error you’re getting, for us to better help you.

Let’s assume the error is on the following line:

#include <dht.h>
dht DHT;  

The compiler does not know what is the dht, as it has never seen that being defined before. I assume, dht.h shall be a header to be included that needs should contain dht type definition. You should look if you have dht.h in your filesystem, and push it in your sketch’s directory. And finally change the #include <dht.h> into #include "dht.h", so it looks up the dht.h in your local directory.

EDIT: I’m sorry I don’t think I can’t help you here more than what I just said. The problem is that you don’t understand what I’m telling you to solve your problem, and explaining it to you would be giving you a C programming lesson. So you should first begin to read the K&R, go to some C/C++/Arduino programing courses (maybe in your local hackerspace?), and/or ask your friend to help you out and explaining to you what is happening.

7

solved what does type error mean in Arduino