# Enviro pHAT Plus
-[![Build Status](https://travis-ci.com/pimoroni/envirophatplus-python.svg?branch=master)](https://travis-ci.com/pimoroni/envirophatplus-python)
-[![Coverage Status](https://coveralls.io/repos/github/pimoroni/envirophatplus-python/badge.svg?branch=master)](https://coveralls.io/github/pimoroni/envirophatplus-python?branch=master)
-[![PyPi Package](https://img.shields.io/pypi/v/envirophatplus.svg)](https://pypi.python.org/pypi/envirophatplus)
-[![Python Versions](https://img.shields.io/pypi/pyversions/envirophatplus.svg)](https://pypi.python.org/pypi/envirophatplus)
+[![Build Status](https://travis-ci.com/pimoroni/enviroplus-python.svg?branch=master)](https://travis-ci.com/pimoroni/enviroplus-python)
+[![Coverage Status](https://coveralls.io/repos/github/pimoroni/enviroplus-python/badge.svg?branch=master)](https://coveralls.io/github/pimoroni/enviroplus-python?branch=master)
+[![PyPi Package](https://img.shields.io/pypi/v/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus)
+[![Python Versions](https://img.shields.io/pypi/pyversions/enviroplus.svg)](https://pypi.python.org/pypi/enviroplus)
# Installing
Stable library from PyPi:
-* Just run `sudo pip install envirophatplus`
+* Just run `sudo pip install enviroplus`
Latest/development library from GitHub:
-* `git clone https://github.com/pimoroni/envirophatplus-python`
-* `cd envirophatplus-python`
+* `git clone https://github.com/pimoroni/enviroplus-python`
+* `cd enviroplus-python`
* `sudo ./install.sh`
#!/usr/bin/env python
import time
-from envirophatplus import gas
+from enviroplus import gas
print("""gas.py - Print readings from the MICS6812 Gas sensor.
Press Ctrl+C to exit!
-
+
""")
try:
print("""light.py - Print readings from the LTR559 Light & Proximity sensor.
Press Ctrl+C to exit!
-
+
""")
try:
print("""particles.py - Print readings from the PM5003 Particle sensor.
Press Ctrl+C to exit!
-
+
""")
pms5003 = PMS5003()
[run]
-source = envirophatplus
+source = enviroplus
omit =
.tox/*
include LICENSE.txt
include README.rst
include setup.py
-recursive-include envirophatplus *.py
+recursive-include enviroplus *.py
Stable library from PyPi:
-- Just run ``sudo pip install envirophatplus``
+- Just run ``sudo pip install enviroplus``
Latest/development library from GitHub:
-- ``git clone https://github.com/pimoroni/envirophatplus-python``
-- ``cd envirophatplus-python``
+- ``git clone https://github.com/pimoroni/enviroplus-python``
+- ``cd enviroplus-python``
- ``sudo ./install.sh``
-.. |Build Status| image:: https://travis-ci.com/pimoroni/envirophatplus-python.svg?branch=master
- :target: https://travis-ci.com/pimoroni/envirophatplus-python
-.. |Coverage Status| image:: https://coveralls.io/repos/github/pimoroni/envirophatplus-python/badge.svg?branch=master
- :target: https://coveralls.io/github/pimoroni/envirophatplus-python?branch=master
-.. |PyPi Package| image:: https://img.shields.io/pypi/v/envirophatplus.svg
- :target: https://pypi.python.org/pypi/envirophatplus
-.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/envirophatplus.svg
- :target: https://pypi.python.org/pypi/envirophatplus
+.. |Build Status| image:: https://travis-ci.com/pimoroni/enviroplus-python.svg?branch=master
+ :target: https://travis-ci.com/pimoroni/enviroplus-python
+.. |Coverage Status| image:: https://coveralls.io/repos/github/pimoroni/enviroplus-python/badge.svg?branch=master
+ :target: https://coveralls.io/github/pimoroni/enviroplus-python?branch=master
+.. |PyPi Package| image:: https://img.shields.io/pypi/v/enviroplus.svg
+ :target: https://pypi.python.org/pypi/enviroplus
+.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/enviroplus.svg
+ :target: https://pypi.python.org/pypi/enviroplus
'Topic :: System :: Hardware']
setup(
- name='envirophatplus',
+ name='enviroplus',
version='0.0.1',
author='Philip Howard',
author_email='phil@pimoroni.com',
license='MIT',
keywords='Raspberry Pi',
url='http://www.pimoroni.com',
- project_urls={'GitHub': 'https://www.github.com/pimoroni/envirophatplus-python'},
+ project_urls={'GitHub': 'https://www.github.com/pimoroni/enviroplus-python'},
classifiers=classifiers,
- packages=['envirophatplus'],
+ packages=['enviroplus'],
install_requires=['pimoroni-bme280', 'pms5003', 'ltr559', 'st7735', 'ads1015']
)
smbus = mock.Mock()
smbus.SMBus = SMBusFakeDevice
sys.modules['smbus'] = smbus
- from envirophatplus import gas
+ from enviroplus import gas
gas.setup()
gas.setup()
smbus = mock.Mock()
smbus.SMBus = SMBusFakeDevice
sys.modules['smbus'] = smbus
- from envirophatplus import gas
+ from enviroplus import gas
result = gas.read_all()
assert type(result.oxidising) == float
smbus = mock.Mock()
smbus.SMBus = SMBusFakeDevice
sys.modules['smbus'] = smbus
- from envirophatplus import gas
+ from enviroplus import gas
assert int(gas.read_oxidising()) == 16641
assert int(gas.read_reducing()) == 16727