Community
cancel
Showing results for 
Search instead for 
Did you mean: 
BSzał
Beginner
1,309 Views

DHT11 on Edison with Python mraa

Hi guys,

Could you please take a look at the question I've recently posted on SO regarding problems with DHT11: http://stackoverflow.com/questions/43453868/dht11-sensor-failure-on-edison-whereas-working-successfu... python - DHT11 sensor failure on Edison whereas working successful on RPi - Stack Overflow

I read some threads here about one-wire devices workaround but I don't fully understand it and maybe do something wrong. Furthermore, nobody ever experienced those IN/OUT switching port problems on RPi. It is also a genuine computer system with real time OS, isn't it?

Thank you in advance,

Bart

Tags (1)
0 Kudos
2 Replies
KMill10
Valued Contributor II
80 Views

The 1-Wire protocol, as you know, requires deterministic timing. It is not possible to do deterministic timing on a computing platform like Edison, or even a PC. You might get somewhere close to it using usleep() but your app may get interrupted at any time, thereby messing up your timings.

What you need to do when using a system without deterministic timing of GPIO is attach the sensor using an interface. That interface should use a small micro which DOES have deterministic timing. (ie a Pic, ATTINY, etc).

  • OR - Use an existing peripheral on your system which does have deterministic timing, such as a UART.

I wrote a blog-post some years ago on how you can use a UART to do 1-Wire protocol. You should be able to find it here: http://wphost.spider-e.com/?p=231 http://wphost.spider-e.com/?p=231

idata
Community Manager
80 Views

Hi guys,

 

 

First, I want to say thanks to SpiderKenny, we really appreciate your help in the community. And Bart, I recommend you to try SpiderKenny's suggestions, in case you need more information take a look at this thread created by SpiderKenny: https://communities.intel.com/thread/55975 https://communities.intel.com/thread/55975

 

 

I hope you consider this useful.

 

 

Regards,

 

Leonardo R.
Reply