Page MenuHomeFreeBSD

Add driver for temperature/humidity sensor DHT11 to expose data via sysctl
ClosedPublic

Authored by mizhka on Jan 14 2017, 10:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sep 19 2024, 6:16 AM
Unknown Object (File)
Sep 8 2024, 11:31 PM
Unknown Object (File)
Sep 8 2024, 10:16 PM
Unknown Object (File)
Sep 8 2024, 1:25 AM
Unknown Object (File)
Aug 19 2024, 11:23 AM
Unknown Object (File)
Aug 17 2024, 4:43 PM
Unknown Object (File)
Aug 2 2024, 8:05 AM
Unknown Object (File)
Jul 27 2024, 12:58 AM
Subscribers

Details

Summary

Hi,

This patch adds driver for temperature/humidity sensor connected via GPIO. It called gpioths. Just add "device gpioths" into kernel and hints like:

# Temp/Humidity sensors
hint.gpioths.0.at="gpiobus0"
hint.gpioths.0.pins=1

As results it will provide temperature/humidity values via sysctl:

dev.gpioths.0.temperature: 28
dev.gpioths.0.humidity: 31

DHT11 is cheap & popular temperature/humidity sensor and there is significant amount of blog posts how to meet freebsd & DHT11 (last dated by today, Jan14). It's really worth to bring support into tree. DHT11 is single-wire sensor. It can be connected via GPIO to device like Raspberry Pi or Onion Omega.

Missing bits:

  • man page
Test Plan

Tested on Onion Omega & DHT11

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mizhka retitled this revision from to Add driver for temperature/humidity sensor DHT11 to expose data via sysctl.
mizhka updated this object.
mizhka edited the test plan for this revision. (Show Details)
mizhka added reviewers: adrian, loos.
mizhka set the repository for this revision to rS FreeBSD src repository - subversion.
adrian edited edge metadata.
This revision is now accepted and ready to land.Jan 15 2017, 8:51 PM
This revision was automatically updated to reflect the committed changes.