Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

AOSONG Sensors.

Project description

# AOSONG Sensors

Python package that provides support for AOSONG Sensor.

This package and it's modules have been organized to support additional AOSONG
sensors. It currently only supports the [AM2315 Temperature and Humidity
Sensor]( Additional sensors are
encouraged and welcomed. Please submit a Pull Request.

The original author of this library was
[Sopwith]( This repository was originally forked
from the code provided by the author on [their
blog]( The purpose of the repository is
to provide a pythonic library that can be installed with `pip` and `setuptools`.

## Requirements

* Python 3
* [Quick2wire Python API](

## Installation

### Recommended
pip install --process-dependency-links aosong

### Manual
`python install`

## Usage

>>> from aosong import am2315
>>> sensor = am2315.Sensor()
>>> sensor.temperature()
>>> sensor.celsius()
>>> sensor.fahrenheit()
>>> sensor.temperature(True)
>>> sensor.humidity()
(70.0, 19.1, 66.3)


### returns a tuple containing three values.

`(41.8, 23.5, 74.3)`

The first value is the current relative humidity
The second value is the current temperature in Celsius.
The third value is the current temperature in Fahrenheit.

### Sensor.temperature()

Sensor.temperature() returns the current temperature in Celsius.

If you want the current temperature returned in Fahrenheit pass True as a parameter.


## Test script: is a unittest script you should run to ensure your sensor
is wired correctly. If it is, you should see the below test results.

`python test`

## Support and Contribution

Pull requests and Issues are welcome!

Otherwise, please feel free to report bugs, comments, enhancement requests to:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
aosong-0.0.2.macosx-10.9-x86_64.tar.gz (7.4 kB) Copy SHA256 hash SHA256 Source None
aosong-0.0.2.tar.gz (4.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page