Am2302
C++ Arduino library driver for the AM2302 or DHT22
Install / Use
/learn @frankbekema/Am2302README
am2302
C++ Arduino library driver for the AM2302 or DHT22
Usage
To use this driver you will need to make a folder in your Arduino libraries directory called "AM2302". After you have done that you can import the driver by using your Arduino libary manager.
Example
//Include libary
#include <AM2302.h>
//Initialize sensor on GPIO pin 14
AM2302 sensor(14);
void setup() {
//Start serial input on baud rage 9600
Serial.begin(9600);
}
void loop() {
//Read the sensor
AM2302_res result = sensor.read();
//Print humidity in % RH
Serial.print("Humidity ");
Serial.println(result.humidity);
//Print temperature in celcius
Serial.print("Temperature ");
Serial.println(result.temperature);
//Boolean wether the tempature was read correctly
Serial.print("Correct ");
Serial.println(result.correct);
//Wait 2 seconds
delay(2000);
}
License
This project is licensed under the MIT license
Questions?
If you have any questions feel free to contact Frank Bekema on frankbekema10@gmail.com or open up an issue.
Related Skills
node-connect
348.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
