Skip to content

Read temperature and humidity from dht11 and dht22 over gpio of omega2

Notifications You must be signed in to change notification settings

h0l0gram/omega2-checkHumidity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

omega2-checkHumidity

Adapted code (fastgpio) to get DHT11-DHT22-Sensor-Examples working on Omega2(+).

omega2+ with DHT22

Prerequisites

  • Omega2(+)
  • Compiled binary requires firmware 0.1.10 b160 (you may be able to compile from source for older firmware as well) (See Updating the Omega2 to check or update firmware)

Install

root@Omega-1234:~# mkdir checkHumidity && cd checkHumidity
root@Omega-1234:~/checkHumidity# wget https://github.com/h0l0gram/omega2-checkHumidity/raw/master/bin/checkHumidity
root@Omega-1234:~/checkHumidity# chmod -R 755 checkHumidity

Run

./checkHumidity <GPIO-PIN> <DHT-TYPE>
GPIO-PIN : 0-19
DHT-TYPE : DHT11 or DHT22

Example

root@Omega-1234:~#cd checkHumidity
root@Omega-1234:~/checkHumidity# ./checkHumidity 19 DHT22
48.299999
28.299999

See https://wiki.onion.io/Tutorials/PHP-DHT11-DHT22-Sensor-Examples

Hints/improvements welcome!

Cross compile env used:

docker run -it --name omega2-sdk-app -v /mysource:/remote jlcs/omega2-sdk bash
cd /lede;make

git clone https://github.com/h0l0gram/omega2-checkHumidity.git /mysource

Origin tutorial and source

Links

Credits

About

Read temperature and humidity from dht11 and dht22 over gpio of omega2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published