Welcome, Guest

Author Topic: Read DHt11 sensor with A10 lime  (Read 3404 times)

pawnies20

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +0/-0
Read DHt11 sensor with A10 lime
« 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
« Last Edit: October 14, 2014, 12:26:46 PM by pawnies20 »

Cosik

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +2/-1
Re: Read DHt11 sensor with A10 lime
« Reply #1 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?

pawnies20

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +0/-0
Re: Read DHt11 sensor with A10 lime
« Reply #2 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

Cosik

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +2/-1
Re: Read DHt11 sensor with A10 lime
« Reply #3 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.

pawnies20

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +0/-0
Re: Read DHt11 sensor with A10 lime
« Reply #4 on: October 16, 2014, 06:30:43 PM »
Ok, perfect, i will try this night!!!

MBR

  • Sr. Member
  • ****
  • Posts: 256
  • Karma: +19/-0
Re: Read DHt11 sensor with A10 lime
« Reply #5 on: October 18, 2014, 06:46:55 AM »
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

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +2/-1
Re: Read DHt11 sensor with A10 lime
« Reply #6 on: October 21, 2014, 11:57:02 AM »
Hi pawies20,

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