Enviro pHAT environmental sensor board driver
Project description
https://shop.pimoroni.com/products/enviro-phat
The Pimoroni Enviro pHAT boast a plethora of sensors and connectivity for measuring your environment.
Enviro pHAT includes:
An LSM303D accelerometer/magnetometer for detecting orientation, motion and heading
A BMP280 temperature/pressure sensor
A TCS3472 colour sensor, for detecting the amount and colour of light
An ADS1015 analog sensor with four 3.3v tolerant channels for your external sensors
A 5v power supply pin for powering your sensors, which you can regulate or divide to 3v if needed
Two LEDs connected to GPIO #4 for illuminating objects over the colour sensor
Installing
Full install (recommended):
We’ve created an easy installation script that will install all pre-requisites and get your Enviro pHAT up and running with minimal efforts. To run it, fire up Terminal which you’ll find in Menu -> Accessories -> Terminal on your Raspberry Pi desktop, as illustrated below:
In the new terminal window type the command exactly as it appears below (check for typos) and follow the on-screen instructions:
curl https://get.pimoroni.com/envirophat | bash
Alternatively, on Raspbian, you can download the pimoroni-dashboard and install your product by browsing to the relevant entry:
sudo apt-get install pimoroni
(you will find the Dashboard under ‘Accessories’ too, in the Pi menu - or just run pimoroni-dashboard at the command line)
If you choose to download examples you’ll find them in /home/pi/Pimoroni/envirophat/.
Manual install:
Library install for Python 3:
on Raspbian:
sudo apt-get install python3-envirophat
other environments:
sudo pip3 install envirophat
Library install for Python 2:
on Raspbian:
sudo apt-get install python-envirophat
other environments:
sudo pip2 install envirophat
Development:
If you want to contribute, or like living on the edge of your seat by having the latest code, you should clone this repository, cd to the library directory, and run:
sudo python3 setup.py install
(or sudo python setup.py install whichever your primary Python environment may be)
In all cases you will have to enable the i2c bus.
Documentation & Support
Guides and tutorials - https://learn.pimoroni.com/enviro-phat
Function reference - http://docs.pimoroni.com/envirophat/
GPIO Pinout - https://pinout.xyz/pinout/enviro_phat
Get help - http://forums.pimoroni.com/c/support
1.0.1
Fix: Corrected upper bounds check for tilt_heading
1.0.0
Fix: Defer setup to avoid import side-effects
Fix: QNH changed to ISA standard
Tweak: New Enviro pHAT I2C addr now default
Added: unit argument to pressure to choose Pa or hPa
0.0.6
Added __version__ to module
Added DocStrings
0.0.5
Bug fix to lsm303d raw_heading
0.0.4
Tidy up of read functions in bmp280
Fixed incorrect call to pressure method
0.0.3
Python3 fix
0.0.2
Bug fixes
0.0.1
Initial release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file envirophat-1.0.1.tar.gz
.
File metadata
- Download URL: envirophat-1.0.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a015a9fadf6bc90e67bdfde9ee0466d0c05dfeae2fe5b0ac8fa7b15ad540f83 |
|
MD5 | 096bb692d46a0a3d20f414d291cb5a75 |
|
BLAKE2b-256 | de345450a17923a459eda8b4423b909ce271bf50d6fb0d91c3f2aa6387cd5d45 |
File details
Details for the file envirophat-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: envirophat-1.0.1-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ddca374999ccd32ecddc44ba6f94196e3d4cd63178c4ea4e31ccc3653a94620 |
|
MD5 | ba62d31bfb7ad1b98077e1014cb6b4ac |
|
BLAKE2b-256 | 8af15b0f260678298dcc1204ae73d2c8c60e669a65eed4ab4f579960d0d0c801 |
File details
Details for the file envirophat-1.0.1-py2-none-any.whl
.
File metadata
- Download URL: envirophat-1.0.1-py2-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b36739af897e06f6b2a1e5b456f90bbe04d5c6052182be505d6ae90517c4c4bb |
|
MD5 | 3e73f31f6f9de6fff14c7f9a15f468b6 |
|
BLAKE2b-256 | f35dd6d1db6e9f3fa9633e2ff3b2d6cc15bc92fba06aa3c30cdfa5a1d70e4938 |