Skip to content

aht10 temperature and rh light weight as possible

Notifications You must be signed in to change notification settings

rshcs/aht10_simple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aht10_simple

aht10 temperature and rh light weight as possible.

  • This library tested with AHT10 and AHT15 sensors

Available Functions

  • Temperature reading
  • Humidity reading
  • Soft reset
  • Status read

Example code:

#include "aht10.h"

void setup() 
{
  Serial.begin(9600);
  aht.begin(); // or Wire.begin()
  delay(200);
}

void loop() 
{
  aht.trigMeasure(); // Trigger a measurement
  delay(100); // Have to wait more than 75millis until preparing the data
  aht.reqData(); // Requsts all(6) bytes 
  Serial.print(aht.tempRead()); // Print temperature value
  Serial.print(" | ");
  Serial.println(aht.rhRead()); // Print humidity value
  
  delay(10000); // If data request interval smaller than 2S internal temperature of the sensor could go high
}

Output -> Serial print

The first column shows temperature and the second columns shows humidity.

Serial print

About

aht10 temperature and rh light weight as possible

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages