Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [kura-dev] Read DHT11 sensor data using kura.gpio

Hi Manoj,

Am 30.07.2016 2:47 nachm. schrieb "Manoj Verma" <manoj.kumar.mbm@xxxxxxxxx>:

> I tried http://eclipse.github.io/kura/doc/kura-dio-apis.html

Can you please provide more info on what exactly your problem is? Which Kura version do you use?

DHT11 uses the 1-wire protocol. You practically need to implement the whole communication by sending 1s and 0s via one of the GPIO pins.

I suggest that you take one of the already exiting libraries Arduino DHTLib [1] for example, analyse which command you need to send to the sensor and implement everything with the Kura.

Practically, first you need to set the pin to which you will connect the DHT11 signal pin as output send the command bit by, than switch the pin direction to input and wait for the value to be received. The trick is that you send/receive the values serially, bit by bit, so you'll have to shift the bits in order to get the whole value. Check the Arduino library, the things will be much clearer ;)

References:
[1] http://playground.arduino.cc/Main/DHTLib

HTH.

Best regards,
Jovan




Back to the top