ATH10 sensor help

Hello,
I use this sensor in my project ...
Everything works but I wanted to know what this command (Adafruit_AHTX0 aht;) means and I did not find an answer in Google, can anyone please help?

Adafruit_AHTX0 aht;

Creates an object that is an instance of the Adafruit_AHTX0 library and it is named named aht so that subsequent commands can be sent to it and data read from it using its name

If you had 2 such devices you could do

Adafruit_AHTX0 aht0;
Adafruit_AHTX0 aht1;

to create 2 instances and refer to them separately by their names

Thank you very much!
Can you please also tell me what this command is?
sensors_event_t humidity, temp;

That line declares two variables of type sensors_event_t.

Study the Adafruit help pages and library documentation carefully.

Thanks, yes I think I should go through the library...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.