Skip to content

abelectronicsuk/ABElectronics_Python2_Libraries

Repository files navigation

AB Electronics Python 2 Libraries

Important Note: Legacy Version

This repository contains Python 2.7 compatible libraries for working with Raspberry Pi expansion boards from https://www.abelectronics.co.uk. It is maintained as a legacy version for compatibility with Python 2 systems will receive no new feature updates.

Python 3 Users: If you're using Python 3 (recommended for new projects), please use our Python 3 compatible libraries available at: https://github.com/abelectronicsuk/ABElectronics_Python_Libraries


Downloading and Installing the library

Download the ABElectronics_Python2_Libraries to your Raspberry Pi:

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

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_Python2_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 copy the necessary 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 use the class's functionality in your project.

from IOPi import IOPi

To configure the SPI bus, follow our SPI and Python on Raspberry Pi OS tutorial.

To configure the I2C bus, follow our Enabling I2C on the Raspberry Pi tutorial.

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

About

Python 2 compatible version of the AB Electronics UK python library

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages