Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: speeskeek on October 06, 2016, 11:23:44 AM

Title: Dht22/am2302
Post by: speeskeek 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/ (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.
Title: Re: Dht22/am2302
Post by: speeskeek 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...
Title: Re: Dht22/am2302
Post by: bmarkus 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

Title: Re: Dht22/am2302
Post by: speeskeek 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.
Title: Re: Dht22/am2302
Post by: speeskeek 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...