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.4.tar.gz (6.6 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.4-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: EBRPIH1118-0.1.4.tar.gz
  • Upload date:
  • Size: 6.6 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.4.tar.gz
Algorithm Hash digest
SHA256 bdebd9c4d6603e3966e9ace0e85937e620830f24f11168f9ab524df0824c9741
MD5 384dc96f5842b104aca32d862ef1b1dd
BLAKE2b-256 f249d4f704dad6d56d57a0c6936ceb931176911410d3d21127288d4a7d9e74c8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: EBRPIH1118-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b3545a7254eea02cbb1c5244846550471d82a3abeb3ea85df3ad0db7e36d2b25
MD5 9cfac5f932dbabb03866b04431952698
BLAKE2b-256 991e4a3dbfdbee1ce10bd50095fa71c4be19fdd7578acd3f931d252ba4fe532f

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