Giter Club home page Giter Club logo

upython-dht22's Introduction

uPython-DHT22

This module provides a device driver for DHT22 (or DHT11 or AM2302) sensors on microPython board.

You can check more about these temperature and humidity sensors at the following page: http://www.adafruit.com/products/385

You can check more about the microPython project here: http://micropython.org/

Wiring

The basic wiring is designed to use no additional parts (like a pull-up resistor) and can be directly put to the microPython board. The wiring:

Sensor pin | board pin
-----------+----------
    VDD    |    Y1
    DTA    |    Y2
    NC     |    Y3
    GND    |    Y4

You can check photos, how it is plugged in at this page.

Installation

There are two files:

  • DHT22.py - the module implementing communication with the sensor
  • main.py - a sample file how to use the module (to use it you will need LCD panel installed)

The simplest installation way is to follow these steps (Linux):

  1. Connect your microPython board to your PC using a USB cable
  2. Mount the device pointing to the board (/dev/sdb1 in my case)
mkdir ~/tmp
sudo mount /dev/sdb1 ~/tmp
  1. copy DHT22.py and main.py files to the board
sudo cp DHT22.py main.py ~/tmp
  1. Unmount the device
sudo umount ~/tmp
  1. Restart your microPython board

upython-dht22's People

Contributors

kurik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.