WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Dht22/am2302  (Read 2035 times)

Offline speeskeek

  • Newbie
  • *
  • Posts: 4
Dht22/am2302
« on: October 06, 2016, 11:23:44 AM »
Hi there,

Love the piCore software. Got it running on a rpiZero with cheap nano-wifi-realtek.
Boots very fast and ... NO CORRUPTION. Great work!

My question: how can i read from a sensor connected to the board?
I want to do something like: http://www.instructables.com/id/Raspberry-Pi-Temperature-Humidity-Network-Monitor/step8/Add-readings-to-the-database/
But I dont want to log to a local DB, but a remote sql DB on my NAS.

I installed wiringpi.tcz but looks like I'm stuck.

Offline speeskeek

  • Newbie
  • *
  • Posts: 4
Re: Dht22/am2302
« Reply #1 on: October 07, 2016, 02:24:22 AM »
Please note that I got it working a few weeks ago with a raspbian. But now I'm stcuk with the tcz's and meybe the dt-overlay...

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Dht22/am2302
« Reply #2 on: October 07, 2016, 02:58:05 AM »
There is a nice article how to get it work on RPi, Did you try it?

https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/overview

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline speeskeek

  • Newbie
  • *
  • Posts: 4
Re: Dht22/am2302
« Reply #3 on: October 07, 2016, 05:09:39 AM »
yeah.. tried multiple tutorials..

tc@box:~/Adafruit_Python_DHT/examples$ sudo ./AdafruitDHT.py 2302 4
Failed to get reading. Try again!

using short cable. 3,3V.
+ on gpio 1
data on gpis 7
ground on gpio 9


can it be something that the pin needs to be high when booting?
I read something like that, but dont understand how to realize.
« Last Edit: October 07, 2016, 05:17:34 AM by speeskeek »

Offline speeskeek

  • Newbie
  • *
  • Posts: 4
Re: Dht22/am2302
« Reply #4 on: October 09, 2016, 02:38:18 PM »
also with the wiring thing.:

Code: [Select]
tc@box:~/wiringPi-b0a60c3/examples$ sudo ./rht03
     1,      1: Temp:   0.0, RH:   0.0%  Max/Min Temp:   0.0:  0.0  Max/Min RH:   0.0:  0.0
     2,      1: Temp:   0.0, RH:   0.0%  Max/Min Temp:   0.0:  0.0  Max/Min RH:   0.0:  0.0
     3,      1: Temp:   0.0, RH:   0.0%  Max/Min Temp:   0.0:  0.0  Max/Min RH:   0.0:  0.0
     4,      1: Temp:   0.0, RH:   0.0%  Max/Min Temp:   0.0:  0.0  Max/Min RH:   0.0:  0.0
     5,      1: Temp:   0.0, RH:   0.0%  Max/Min Temp:   0.0:  0.0  Max/Min RH:   0.0:  0.0
     6,      1: Temp:   0.0, RH:   0.0%  Max/Min Temp:   0.0:  0.0  Max/Min RH:   0.0:  0.0

:( where can I start to find a solution?
the sensor worked once on that pi0...