"expected unqualified-id" Error after trying to add delay to parts of script.

May I ask, what is this line supposed to do?

#define sensor SimpleDHT11

...and suddenly you've switched libraries, without any comment on the subject? :slight_smile:

To see how a sensor object is defined (it is an instantiation of a class), see the example sketches that come with the library.