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 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.

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.0.tar.gz (5.8 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.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: EBRPIH1118-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 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.0.tar.gz
Algorithm Hash digest
SHA256 dc5916622f66b9b5eaf4a1e07feb75135e0c16da9756beef7910bba7ebad918c
MD5 300247f86a7ac5f56e2bf71125e6ee10
BLAKE2b-256 676f9eb89b2975506d426ff2cb115475c0dc925c85f751195d5d8ca7df9b0d98

See more details on using hashes here.

File details

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

File metadata

  • Download URL: EBRPIH1118-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8435c467fcb94e71b1531eac0b57a88462c16caf5a4c16c7354208201b95e872
MD5 fc488840fcd14e38606592e09df1ecd6
BLAKE2b-256 5be942602cb4c5ddbe3c8a9a28804b55ee66010c0ee52541fc272894d8e74aa0

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