Skip to main content

A Python package to interface with the board, and control relays, digital inputs/outputs, and analog inputs on Raspberry Pi.

Project description

EBRPIH1118

EBRPIH1118

EBRPIH1118 is a Python package designed to facilitate the control of hardware resources such as relays, digital inputs (DI), digital outputs (DO), analog inputs (AI), and temperature sensors on a Raspberry Pi. This package provides a convenient API to interact with GPIO pins and SPI devices, making it easy to develop automation applications on the Raspberry Pi.

Features

  • Relay Control: Easily manage relays connected to the Raspberry Pi GPIO pins.
  • Digital Input/Output: Read from and write to digital input/output pins.
  • Analog Input: Read analog sensor data using SPI interface.
  • Temperature Sensor Integration: Read data from 1-wire temperature sensors.
  • Flexible Hardware Management: Abstract hardware interaction with a clean, easy-to-use API.

Installation

You can install EBRPIH1118 using pip. Ensure you have the necessary Python libraries for GPIO and SPI communication.

Prerequisites

Before installing EBRPIH1118, ensure that your Raspberry Pi is set up with the following libraries:

sudo apt-get update
sudo apt-get install python3-pip python3-rpi.gpio python3-spidev

Installing the Package

pip install EBRPIH1118

Usage

Importing the Package

from EBRPIH1118_intf import ebrpih1118

Example usage

from EBRPIH1118_intf import ebrpih1118

# Initialize GPIO and SPI
hardware_manager = ebrpih1118.EBRPIH1118()

# Example: Turn on relay #1
hardware_manager.energize_relay(relay_number=1)

# Example: Read an analog input from channel 1 to 4 (SPI)
analog_value = hardware_manager.read_ai_channels(channels="1,2,3,4")
print(f"Analog Input Values: {analog_value}")

# Cleanup after operations
hardware_manager.cleanup()

Steps to Contribute

Fork the repository. Create a new branch for your feature or bug fix. Make your changes. Submit a pull request to the main repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • This package uses the RPi.GPIO library for GPIO control.
  • It also uses the spidev library for SPI communication.

More Information

For more details, visit our website: www.electronbits.com

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

EBRPIH1118-0.1.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

EBRPIH1118-0.1.3-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file EBRPIH1118-0.1.3.tar.gz.

File metadata

  • Download URL: EBRPIH1118-0.1.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for EBRPIH1118-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6d3500d3f70b4f77ee58fd0d7086cccbff12e3e88e4022abbb79e4cf75c8addb
MD5 54fb4617c64c429229840511043f7d51
BLAKE2b-256 b785ee9b6fe5cde31463a9a2d48b6c261b6b2f17617a506dca4774041fd572ae

See more details on using hashes here.

File details

Details for the file EBRPIH1118-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: EBRPIH1118-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.2

File hashes

Hashes for EBRPIH1118-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1265b38ab13be1f50cf026b8b8f53907f9f6bd2938fd52fb6494a911fbe22163
MD5 b4f8aa6372aa059f89297127226d1a64
BLAKE2b-256 a4dc184e4a56f61944c9d88e32b00a3898f74e725688973a94d9bbeaf4ea3613

See more details on using hashes here.

Supported by

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