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
Sensor AHT20
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Sensor AHT20
Are you using a loop that continuously tries aht.begin as our example code does?
We also have a 1/2 second delay in the main example loop.
https://learn.adafruit.com/adafruit-aht20/arduino
Code: Select all
if (! aht.begin()) {
Serial.println("Could not find AHT? Check wiring");
while (1) delay(10);
}
https://learn.adafruit.com/adafruit-aht20/arduino
Please be positive and constructive with your questions and comments.