Read DHt11 sensor with A10 lime

Started by pawnies20, October 14, 2014, 12:22:56 pm

Previous topic - Next topic

pawnies20

October 14, 2014, 12:22:56 pm Last Edit: October 14, 2014, 12:26:46 pm by pawnies20
Hello.
I have problemes with DHT11 code.

I find a cubieboard with A10 processor script here:

https://github.com/klagges/dht-CT
http://www.forum-cubieboard.de/Thread-sensor-dht-11-auslesen

The code is the same using with imx233 here:
https://github.com/borisov-r/olinuxino


To compile the scropt you must download gpio_lib.h


My problem is that i can see date enter but never good data.
Then script never watch me temp and humidity.
I think i have a cheksum problem but can't tell why...
Can someone help me?

Thanx

Cosik

Hi pawnies20,

I don't have DHT11, but maybe I know where could be the problem with software delays. Full software interfaces has very restricted time slots, and time issues.

Do you set native frequency of A10?

pawnies20

Hi Cosik.
Thank you for your help.
I'm happy that you can help me
No, i don't know hox set native frequency of A10.

Thanx a lot

Cosik

You should use cpufreq-set command, but in this moment I can't confirm you how exactly you should use it, but you need try to disable cpu frequency scaling.

pawnies20

Ok, perfect, i will try this night!!!

MBR

Quote from: Cosik on October 16, 2014, 05:20:19 pm
You should use cpufreq-set command, but in this moment I can't confirm you how exactly you should use it, but you need try to disable cpu frequency scaling.


If you want do disable frequency scaling, you should use a governor with fixed frequency, eg. performance (max. freq.), powersave (min. freq.) or userspace (user set freq.). Look for available ones with cpufreq-info -g and set them wit cpufreq-set -g <pgovernor>, eg. cpufreq-set -g performance.

PS: If you want a correct timing, you should rather schedule your program as realtime.

Cosik

Hi pawies20,

Did you try it? Could you share yours status of testing it?