Code Monkey home page Code Monkey logo

abelectronics_python_libraries's Introduction

AB Electronics Python Libraries

Python Libraries to work with Raspberry Pi expansion boards from https://www.abelectronics.co.uk

Downloading and Installing the library

Python 3

To install the library you will need the Python3 build and install packages. To install them run the following command.

sudo apt update
sudo apt install python3-build python3-installer git

Download the ABElectronics_Python_Libraries to your Raspberry Pi:

git clone https://github.com/abelectronicsuk/ABElectronics_Python_Libraries.git

To install the python library navigate into the ABElectronics_Python_Libraries folder and run:

python3 -m build
sudo python3 -m installer dist/*.whl

Python 2

If you want to install the library on older versions of Linux using Python 2 you can run the following command.

sudo python setup.py install

If you have PIP installed you can install the library directly from GitHub with the following command replacing python2.7 with the version of Python on your computer:

sudo python2.7 -m pip install git+https://github.com/abelectronicsuk/ABElectronics_Python_Libraries.git

Using classes without installing the library.

To use a specific part of our Python library in your project without installing the entire library, you can simply copy the needed class file into your project's directory. For example, to use the IO Pi Plus, copy the IOPi.py file from the IOPi directory to where your project files are located. After doing this, you can use the class in your program by adding an import statement at the beginning of your Python code. This allows you to directly utilize the class's functionality in your project.

from IOPi import IOPi

ADCDACPi

This directory contains ADC DAC Pi Python Library with ADC read and DAC write demos to use with the ADC DAC Pi

ADCPi

This directory contains ADC Pi Python Library and demos to use with the ADC Pi

ADCDifferentialPi

This directory contains ADC Differential Pi Python Library and demos to use with the ADC Differential Pi
This library is also compatible with the Delta-Sigma Pi

ExpanderPi

This directory contains IO Pi Python Library and demos to use with the Expander Pi

I2C Switch

This directory contains the I2C Switch Python library and demo to use with the 4-channel I2C switch

IOPi

This directory contains IO Pi Python Library and demos to use with the IO Pi Plus

IOZero32

This directory contains IO Zero 32 Python Library and demos to use with the IO Zero 32

RTCPi

This directory contains RTC Pi Python Library and demos to use with the RTC Pi

ServoPi

This directory contains ServoPi Python Library and demos to use with the Servo Pi

07-07-2017 Changes for Version 2.0

Version 2.0.0 of the Python library has introduced several changes to the structure of the classes and demo files. The major changes are listed below. Please read CHANGELOG.md for a complete list of changes.

  • Files renamed: removed ABE_ from all names.
    ABE_ADCDACPi > ADCDACPi
    ABE_ADCDifferentialPi > ADCDifferentialPi
    ABE_ADCPi > ADCPi
    ABE_ExpanderPi > ExpanderPi
    ABE_IOPi > IOPi
    ABE_RTCPi > RTCPi
    ABE_ServoPi > ServoPi

  • All classes and demo files are now compatible with Python 2 and 3. The ABElectronics_Python3_Libraries will no longer be updated so please use this version instead for your Python 3 projects.

  • Moved all demo files into demo sub-folders for each class

  • The ABE_Helper class has been integrated into the board classes and does not need to be imported separately.

  • Added a setup.py into the root for installing the library into the main Python library directory.

Previous versions of the Python libraries can be found at https://github.com/abelectronicsuk/Archive

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.