dht 0.0.8

  • Readme
  • Changelog
  • Installing
  • 0

DHT Dart/Native library #

A library for DHTxx and SHT3x sensors. Supported devices:

Use of the DHT Dart/Native source code is governed by a BSD-style license that can be found in the LICENSE files in corresponding folders.

The Native library uses:

Your use of the DHT Dart/Native signifies acknowledgement of and agreement to the aforementioned licenses.

Content #

dht/ - Dart library

dht_native/ - Native library, includes Adafruit Industries source code

third_party/ DHT22-sensor-driver/ - Linux driver

Native lib installation/upgrade #

$ sudo cp libdht_native.so /usr/local/lib/ $ sudo ldconfig

Linux driver insertion example (optional) #

$ sudo insmod dht22_driver.ko gpio=4 autoupdate=1

Usage #

Simple usage examples see in the dht/example/ folder

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.0.8 #

  • Implemented SHT3x sensor support

0.0.6 #

  • Implemented sampling history:
    • Constructor DHT(DHT_Model model, RPI_Pin pin, [int bufferSize = _DEFAULT_BUFFER_SIZE])
    • Stream DHT.readHistory({final int begin = TIMESTAMP_MIN, final int end = TIMESTAMP_MAX, final int pageSize = _DEFAULT_HISTORY_PAGE_SIZE})

0.0.5 #

  • Implemented stream read:
    • DHT.readStream(Duration interval)

0.0.4 #

  • Native library is not binary compatible with version 0.0.3 - please upgrade as described further in [Native lib installation/upgrade]
    • Native library's DHT.read() returns sensor data as TypedData i.s.o. an array of two Doubles

0.0.1 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  dht: ^0.0.8

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:dht/dht.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://dart.dev/dart-2#migration.

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.1 <2.0.0