Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.
/ DHTPort Public archive

Arduino adapter library for reading DHT sensors through JeeNode/JeeLib Ports using DHTlib

License

Notifications You must be signed in to change notification settings

jwueller/DHTPort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DHTPort

Fetch DHT sensor readings through JeeNode/JeeLib Ports.

This library adapts the DHTlib interface for use with JeeLib Ports. Both of these libraries are dependencies of this adapter.

Usage

This library expects the DHT data line to be connected to the digital pin of the specified JeeLib Port.

#include <Ports.h>
#include <dht.h>
#include <DHTPort.h>

#define DHT22_PORT 4 // JeeLib Port number
DHT22Port dhtSensor(DHT22_PORT);

int chk = dhtSensor.read();

// handle 'chk' according to the DHTlib documentation
if (chk == DHTLIB_OK) {
    Serial.print("humidity: ");
    Serial.println(dhtSensor.humidity(), 1);
    Serial.print("temperature: ");
    Serial.println(dhtSensor.temperature(), 1);
}

About

Arduino adapter library for reading DHT sensors through JeeNode/JeeLib Ports using DHTlib

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages