Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A10 => Topic started by: pawnies20 on October 14, 2014, 12:22:56 pm

Title: Read DHt11 sensor with A10 lime
Post by: pawnies20 on October 14, 2014, 12:22:56 pm
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
Title: Re: Read DHt11 sensor with A10 lime
Post by: Cosik on October 15, 2014, 11:09:36 pm
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?
Title: Re: Read DHt11 sensor with A10 lime
Post by: pawnies20 on October 16, 2014, 03:03:40 pm
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
Title: Re: Read DHt11 sensor with A10 lime
Post by: 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.
Title: Re: Read DHt11 sensor with A10 lime
Post by: pawnies20 on October 16, 2014, 06:30:43 pm
Ok, perfect, i will try this night!!!
Title: Re: Read DHt11 sensor with A10 lime
Post by: MBR on October 18, 2014, 06:46:55 am
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.
Title: Re: Read DHt11 sensor with A10 lime
Post by: Cosik on October 21, 2014, 11:57:02 am
Hi pawies20,

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