Adapted code (fastgpio) to get DHT11-DHT22-Sensor-Examples working on Omega2(+).
- 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)
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
./checkHumidity <GPIO-PIN> <DHT-TYPE>
GPIO-PIN : 0-19
DHT-TYPE : DHT11 or DHT22
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!
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
- http://community.onion.io/topic/299/dht11-and-dht22-temperature-humidity-sensor-code
- http://community.onion.io/topic/1390/dht11-22-checkhumidity-syntax-error
- https://github.com/OnionIoT/fast-gpio
- https://docs.onion.io/omega2-docs/cross-compiling.html
- https://github.com/OnionIoT/OpenWRT-Packages/wiki/Setting-Up-the-Cross-Compile-Environment#step-2-get-openwrt-source
- Adafruit Industries (original dht_read implementation)
- Hugetto Hugetto
- Contributors of onion/fast-gpio fastgpioomega2