项目作者: danichoi737

项目描述 :
DHT22 for Raspberry Pi with WiringPi
高级语言: C
项目地址: git://github.com/danichoi737/DHT22.git
创建时间: 2017-10-12T14:49:53Z
项目社区:https://github.com/danichoi737/DHT22

开源协议:

下载


DHT22

Try use DHT22 with Raspberry Pi 3! Tested by Raspbian Stretch (ver. Sep. 2017) and WiringPi v2.44.

How to clone

  1. Open the terminal in Raspbian.
  2. Check your Git installation.
    1. $ sudo apt-get install git-core
  3. Enter a clone command with this repository address.
    1. $ git clone https://github.com/ccoong7/DHT22.git

How to create an executable file

  1. When clone success, change directory to DHT22.
    1. $ cd ~/DHT22
  2. Compile source code to generate an executable file.
    1. $ gcc -o dht22.out dht22.c -lwiringPi
  3. Launch!
    1. $ ./dht22.out
    result

Wiring

  • Vcc 3.3V
  • Signal pin is GPIO 18 (With 5k resistor or 10k parallel)
  • 3rd pin is not used
  • GND
    wiring

Reference

Visit my blog and get more information. (in Korean)