newbie issue with Adafruit_Python_DHT
-
I am trying to read from a DHT22 using Python and the easiest example that I can find. I would think reading from a gpio pin should only be 4 lines of code, but I cannot find that.
What I have done is get Python 2.7
I downloaded Adafruit_Python_DHT from
[https://github.com/adafruit/Adafruit_Python_DHT]However, I get stuck at their command
- sudo apt-get install build-essential python-dev
root@Omega-EFEB:/# sudo opkg install build-essential python-dev
Unknown package 'build-essential'.
Unknown package 'python-dev'.
Collected errors:- opkg_install_cmd: Cannot install package build-essential.
- opkg_install_cmd: Cannot install package python-dev.
What do I need to do to get this to work?
Thanks.
-
@Allan-McCombs Make sure you do a opkg update first, does that help?
-
you might need to uncomment some repo sites in the repo list in order to have the update process visit some repo sites that are by default commented out.
-
Thanks Leif, I did do the update, it always downloads the same 4 files.
Thanks Douglas but I am still a newbie so I don't know where that file lives.
-
I got python installed OK on my Omega 2+ following these instructions:
https://docs.onion.io/omega2-docs/installing-and-using-python.html
-
Python library to read the DHT series of humidity and temperature sensors on a Raspberry Pi or Beaglebone Black.
For all platforms (Raspberry Pi and Beaglebone Black) make sure your system is able to compile Python extensions.
On Raspbian or Beaglebone Black's Debian/Ubuntu image you can ensure your system is ready by executingsudo apt-get update
sudo apt-get install build-essential python-dev/README.md/
So
build-essential
andpython-dev
are Debian packages...
About how to (not use DHT sensors on Omega please read this post.
I think this Omega Weather Station could be the perfect project for you instead of that Adafruit one.