# 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)
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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
aosong-0.0.1-py3.4.egg
(8.9 kB
view details)
File details
Details for the file aosong-0.0.1.tar.gz.
File metadata
- Download URL: aosong-0.0.1.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46574a3e593be82b732fb16808f269572d9677e23183d0b7b97c875656ca357d
|
|
| MD5 |
d1a76e0044472a782e72adb8e858a264
|
|
| BLAKE2b-256 |
5a668aeb19f81e91673d6e4a2981703cabb68d8a02023dbef95cabaa70745738
|
File details
Details for the file aosong-0.0.1.macosx-10.9-x86_64.tar.gz.
File metadata
- Download URL: aosong-0.0.1.macosx-10.9-x86_64.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be352b52d87f0fdc078014b9132d4e24177433a916233deb9e78e0b4b2956327
|
|
| MD5 |
e8e00d2f21180a23f0b8d41e683d8bfd
|
|
| BLAKE2b-256 |
693bbee634680ebc5b8303a7a919b1f75942bf87552b4cbbc5441614d47b64a6
|
File details
Details for the file aosong-0.0.1.linux-armv6l.tar.gz.
File metadata
- Download URL: aosong-0.0.1.linux-armv6l.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
472d831dccaebfcc06f803925e7c010f0f7c5e47d7ba7533f87b8ae94c5e8fab
|
|
| MD5 |
98a957680fd3ed729ba0a51b38b54ece
|
|
| BLAKE2b-256 |
ef3e3981913ad284f325404b00856fa58cd844ec72052c53b9f2078b17124e2c
|
File details
Details for the file aosong-0.0.1-py3.4.egg.
File metadata
- Download URL: aosong-0.0.1-py3.4.egg
- Upload date:
- Size: 8.9 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a7308298dd6479a99ec11291396659246ba7e64d0ff6ba766570ae34e5053bf
|
|
| MD5 |
9af74215cbfcfed8e046a4557824ee24
|
|
| BLAKE2b-256 |
94efa3401a6c1963faf59147da1867fb4a50e310d02bbac04b1600daaf30b1ce
|