sausin / DHT22

DHT22 for Raspberry Pi with WiringPi

Home Page:http://blog.naver.com/ccoong7

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.
$ sudo apt-get install git-core
  1. Enter a clone command with this repository address.
$ git clone https://github.com/ccoong7/DHT22.git

How to create an executable file

  1. When clone success, change directory to DHT22.
$ cd ~/DHT22
  1. Compile source code to generate an executable file.
$ gcc -o dht22.out dht22.c -lwiringPi
  1. Launch!
$ ./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)

About

DHT22 for Raspberry Pi with WiringPi

http://blog.naver.com/ccoong7


Languages

Language:C 100.0%