raspiSensors 2019.3.26

Last updated:

0 purchases

raspiSensors 2019.3.26 Image
raspiSensors 2019.3.26 Images
Add to Cart

Description:

raspiSensors 2019.3.26

Raspberry Pi Sensors
This is a Python 3 package that enables Raspberry Pi to read various sensors .It has been tested on Python 3.5/Raspbian (stretch).
Supported devices include:

HCSR04 ultrasonic sensor
PCA9685 Adafruit 16-channel 12 Bit PWM Driver
BMP280 Barometer
Triple Axis Magnetometer QMC5883L
AS3935 lightning sensor MOD-1016 embedded adventures

REQUIREMENTS

adafruit-circuitpython-servokit

Installation

From source (incl. examples, fritzing and ebooks)

git clone https://github.com/hanshof/rpiSensors.git
cd rpiSensors
python install setup.py


PIP

pip install raspiSensors


HCSR04 ultrasonic sensor

This is the HC-SR04 ultrasonic distance sensor.
This economical sensor provides 2cm to 400cm
of non-contact measurement functionality with a ranging accuracy
that can reach up to 3mm.
Each HC-SR04 module includes an ultrasonic transmitter
, a receiver and a control circuit.


There are only four pins that you need to worry about on the HC-SR04:
VCC (Power), Trig (Trigger), Echo (Receive), and GND (Ground).
You will find this sensor very easy to set up and use for your next range-finding project!

Example:
from raspiSensors import hcsr04 as HCSR04
ultrasonic = HCSR04(trigger_pin = 21, echo_pin = 20)
print(ultrasonic.distance())

returns distance in cm


PCA9685 Adafruit 16-channel 12 Bit PWM Driver

Using only two pins, control 16 free-running PWM outputs!
You can even chain up 62 breakouts to control up to 992 PWM outputs (which we would really like to see since it would be glorious)
It's an i2c-controlled PWM driver with a built in clock. That means that, unlike the TLC5940 family, you do not need to continuously send it signal tying up your microcontroller, its completely free running!
It is 5V compliant, which means you can control it from a 3.3V microcontroller and still safely drive up to 6V outputs (this is good for when you want to control white or blue LEDs with 3.4+ forward voltages)
6 address select pins so you can wire up to 62 of these on a single i2c bus, a total of 992 outputs - that's a lot of servos or LEDs
Adjustable frequency PWM up to about 1.6 KHz
12-bit resolution for each output - for servos, that means about 4us resolution at 60Hz update rate
Configurable push-pull or open-drain output
Output enable pin to quickly disable all the outputs

Example:
from raspiSensors import pca9685 as PCA9685
servos = PCA9685(channels=16)

servos.kit.servo[0].angle = 90

BMP280 Barometer

This is a Barometer Pressure Sensor module
It could measure the pressure and temperature.
This program depend on BMP280.py writted by Adafruit.



Example


Datasheet


Ebook


Fritzing


Triple Axis Magnetometer QMC5883L

Magnetometer QMC5883L is used for measuring the direction and magnitude of the Earth’s magnetic field. It is used for low cost compassing and magnetometry.
It measures the Earth’s magnetic field value along the X, Y and Z axes from milli-gauss to 8 gauss.
It can be used to find the direction of heading of the device.
It uses I2C protocol for communication with microcontroller.



Example


AS3935 lightning sensor MOD-1016 embedded adventures

The MOD1016 is a lightning sensor based on the AMS3935. It allows you to detect
storms up to 40km away.



Example


Datasheet MOD-1016


Datasheet AS3935


Ebook


Fritzing

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.