Sensor AHT20

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Brncsg
 
Posts: 1
Joined: Tue Jul 27, 2021 5:47 pm

Sensor AHT20

Post by Brncsg »

I'm trying using sensor AHT20 to read temperature and humidity. I'm using also the deep sleep function of arduino and in the second cycle of wake up the functions aht.begin() return 0 (zero) and also for the following cycles.
Only for the first cycle the function aht.begin return 1.
I have to do something before the deep sleep, or I have to put some delays before the function. Do someone know what I have to do?
Thanks

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Sensor AHT20

Post by mikeysklar »

Are you using a loop that continuously tries aht.begin as our example code does?

Code: Select all

  if (! aht.begin()) {
    Serial.println("Could not find AHT? Check wiring");
    while (1) delay(10);
  }
We also have a 1/2 second delay in the main example loop.

https://learn.adafruit.com/adafruit-aht20/arduino

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”