Last active
April 8, 2024 11:45
-
-
Save maxpromer/f35bafa9023d5f09ae86dcc919159e90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include <AHT10.h> // AHT10 Arduino library that can be downloaded from here https://github.com/enjoyneering/AHT10 | |
AHT10Class AHT10; | |
void setup() { | |
Serial.begin(9600); | |
Wire.begin(); | |
if (AHT10.begin(eAHT10Address_Low)) | |
Serial.println("Init AHT10 Success!"); | |
else | |
Serial.println("Init AHT10 Failed!"); | |
} | |
void loop() { | |
Serial.println("//Arduino & AHT10//"); | |
Serial.println("Quick Test – Serial Monitor"); | |
Serial.println(String("") + "Humidity(%RH):\t\t" + AHT10.GetHumidity() + "%RH"); | |
Serial.println(String("") + "Temperature(℃):\t" + AHT10.GetTemperature() + "℃"); | |
Serial.println(String("") + "Dewpoint(℃):\t\t" + AHT10.GetDewPoint() + "℃"); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment