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](https://www.adafruit.com/datasheets/AM2315.pdf). Additional sensors are
encouraged and welcomed. Please submit a Pull Request.
The original author of this library was
[Sopwith](http://sopwith.ismellsmoke.net). This repository was originally forked
from the code provided by the author on [their
blog](http://sopwith.ismellsmoke.net/?p=104). 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](https://github.com/quick2wire/quick2wire-python-api)
## Installation
### Recommended
```shell
pip install --process-dependency-links aosong
```
### Manual
`python setup.py install`
## Usage
```python
>>> from aosong import am2315
>>> sensor = am2315.Sensor()
>>> sensor.temperature()
19.1
>>> sensor.celsius()
19.1
>>> sensor.fahrenheit()
66.3
>>> sensor.temperature(True)
66.3
>>> sensor.humidity()
70.1
>>> sensor.data()
(70.0, 19.1, 66.3)
>>>
```
### Sensor.data()
Sensor.data() 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.
`sensor.temperature(True)`
## Test script:
am2315.py 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 setup.py test`
## Support and Contribution
Pull requests and Issues are welcome!
Otherwise, please feel free to report bugs, comments, enhancement requests to:
[sopwith@ismellsmoke.net](mailto:sopwith@ismellsmoke.net)
[http://sopwith.ismellsmoke.net](http://sopwith.ismellsmoke.net)
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](https://www.adafruit.com/datasheets/AM2315.pdf). Additional sensors are
encouraged and welcomed. Please submit a Pull Request.
The original author of this library was
[Sopwith](http://sopwith.ismellsmoke.net). This repository was originally forked
from the code provided by the author on [their
blog](http://sopwith.ismellsmoke.net/?p=104). 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](https://github.com/quick2wire/quick2wire-python-api)
## Installation
### Recommended
```shell
pip install --process-dependency-links aosong
```
### Manual
`python setup.py install`
## Usage
```python
>>> from aosong import am2315
>>> sensor = am2315.Sensor()
>>> sensor.temperature()
19.1
>>> sensor.celsius()
19.1
>>> sensor.fahrenheit()
66.3
>>> sensor.temperature(True)
66.3
>>> sensor.humidity()
70.1
>>> sensor.data()
(70.0, 19.1, 66.3)
>>>
```
### Sensor.data()
Sensor.data() 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.
`sensor.temperature(True)`
## Test script:
am2315.py 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 setup.py test`
## Support and Contribution
Pull requests and Issues are welcome!
Otherwise, please feel free to report bugs, comments, enhancement requests to:
[sopwith@ismellsmoke.net](mailto:sopwith@ismellsmoke.net)
[http://sopwith.ismellsmoke.net](http://sopwith.ismellsmoke.net)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
aosong-0.0.1.tar.gz
(4.4 kB
view hashes)
Built Distribution
aosong-0.0.1-py3.4.egg
(8.9 kB
view hashes)
Close
Hashes for aosong-0.0.1.macosx-10.9-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | be352b52d87f0fdc078014b9132d4e24177433a916233deb9e78e0b4b2956327 |
|
MD5 | e8e00d2f21180a23f0b8d41e683d8bfd |
|
BLAKE2b-256 | 693bbee634680ebc5b8303a7a919b1f75942bf87552b4cbbc5441614d47b64a6 |
Close
Hashes for aosong-0.0.1.linux-armv6l.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 472d831dccaebfcc06f803925e7c010f0f7c5e47d7ba7533f87b8ae94c5e8fab |
|
MD5 | 98a957680fd3ed729ba0a51b38b54ece |
|
BLAKE2b-256 | ef3e3981913ad284f325404b00856fa58cd844ec72052c53b9f2078b17124e2c |