DHT11 sensor with Beaglebone black using python

548 views
Skip to first unread message

karthi geyan

unread,
Dec 25, 2015, 7:19:51 AM12/25/15
to BeagleBoard
Hi . I tried to learn python programming to use the hardware interfacing in Beaglebone Black. I am building a weather station, so i need to read data from DHT11 sensor using BBB in python.  I tried http://www.uugear.com/portfolio/dht11-humidity-temperature-sensor-module/ this by converting the code for Beaglebone but i get some error.  Give me shome suggestions and help me?

Dennis Lee Bieber

unread,
Dec 25, 2015, 12:25:25 PM12/25/15
to beagl...@googlegroups.com
On Fri, 25 Dec 2015 04:19:51 -0800 (PST), karthi geyan
<kaat...@gmail.com> declaimed the
following:
A cut&paste of whatever "some error" would be useful. You don't even
mention if you are trying Python or C language (or even a port to
BoneScript).
--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com HTTP://wlfraed.home.netcom.com/

WZ9V

unread,
Dec 25, 2015, 12:55:32 PM12/25/15
to BeagleBoard
He did specifically say Python. Some code or the error would be helpful, you have not given us anything to go on.

Nuno Sucena Almeida

unread,
Dec 25, 2015, 3:39:54 PM12/25/15
to beagl...@googlegroups.com
Just a word of caution, DHTxx or requivalent AMxxxx type sensors don't
have very good accuracy.

I've been using BME280 and BME180 for humidity/temperature/pressure
measurements with good success.

The BME280/180 use i2c, which is easier to work with, contrasting with
the DHTxx that need precise timing for their proprietary protocol.

regards,
Nuno

--
https://aeminium.org/nuno/

Dennis Lee Bieber

unread,
Dec 25, 2015, 4:58:12 PM12/25/15
to beagl...@googlegroups.com
On Fri, 25 Dec 2015 09:55:32 -0800 (PST), WZ9V
<dfrue...@gmail.com> declaimed the
following:

>He did specifically say Python. Some code or the error would be helpful, you have not given us anything to go on.

Okay -- I did miss the lowercase snake... The link had a page with both
languages... The C code looked to be using an Arduino-compatible library...

From what little I've read on the BBB, I wouldn't want to do any
protocol that needed bit-banging without somehow learning to load the
PRUs... I'm more likely to hook the sensor to an Uno, and use a serial port
to relay readings to the BBB <G>
Reply all
Reply to author
Forward
0 new messages