Skip to main content

Raspberry Pi Sensors

Project description

This Python module is a collection of classes to enable Raspberry PI sensors support. Module also contains core classes to be used for interaction with I2C devices and also 16-bit EEPROM modules.

Supported sensors and measurements:

  1. Bosch BMP180: temperature (Celsius degrees), pressure (Pa)

  2. ST VL6180X: distance (mm), ambient light (lux)

Dependencies

Installation

1. pip install from PyPi

pip install rpisensors

2. pip install from git

pip install git+https://github.com/altosz/rpisensors.git

3. Clone the repository and run setup.py

git clone https://github.com/altosz/rpisensors.git
python setup.py install

Usage

If you have a sensor connected to Raspberry PI 3 (on I2C bus 1), you may run

python -m rpisensors.bmp180
python -m rpisensors.proximity

The output will show the results of measurement. If you have sensors connected to I2C bus 0, you may test the sensor from python console:

>>> from rpisensors import BMP180
>>> sensor = BMP180(0)
>>> print sensor.read_temperature()

Bug Reporting

To submit a bugreport use the GitHub bugtracker for the project:

https://github.com/altosz/rpisensors/issues

Development

You may use I2CDevice class as a base for I2C devices. Or Eeprom16 for devices using 16-bit eeprom.

Authors

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

rpisensors-0.2.1.tar.gz (6.7 kB view details)

Uploaded Source

File details

Details for the file rpisensors-0.2.1.tar.gz.

File metadata

  • Download URL: rpisensors-0.2.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rpisensors-0.2.1.tar.gz
Algorithm Hash digest
SHA256 64986485948ad50f797ec92c9bc76043f248424b4fb42f7050c707a420289bb7
MD5 2b74b486a2dee4cf46a17a896670fea2
BLAKE2b-256 871b479e4456d2add102a5767f548b0226d67aca798662f6b5c4d7f62073c382

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page