DancingQuanta / pyusbiss

Python API for USB-ISS Multifunction USB Communications Module
MIT License
2 stars 3 forks source link
api gpio hardware i2c serial spi spidev usb-iss

=============================== pyusbiss

A Python API module for interfacing with USB-ISS multifunction USB Communication Module.

From the USB-ISS's webpage_:

The USB-ISS Multifunction USB Communications Module provides a complete interface between your PC and the I2C bus, SPI bus, a Serial port and general purpose Analogue Input or Digital I/O. The module is powered from the USB. Operating voltage is selectable between 3.3v and 5v and can supply up to 80mA at 5v for external circuitry from a standard 100mA USB port.

Features

Planned features


Current features

Installation

::

pip install pyusbiss

Usage

Connect to your USB-ISS and get information about your USB-ISS.

::

from usbiss.usbiss import USBISS

port = 'COM4' # Windows port = '/dev/ttyACM0' # Linux

cxn = USBISS(port) print(repr(cxn)))

Initiate USB-ISS with SPI mode and open a port.

::

from usbiss.spi import SPI

spi = SPI(port)

spi.mode = 1 spi.max_speed_hz = 500000

print(repr(spi._usbiss))

SPI transaction

response = spi.xfer([0x00, 0x00])

More Information

Applications

Credits

The project was developed during a NERC's placement at University of Leeds.

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Inspired by Waggle's alphasense.py_, where most of USB-ISS functions were copied over.

.. _USB-ISS's webpage: https://www.robot-electronics.co.uk/htm/usb_iss_tech.htm .. _pyserial: https://pypi.python.org/pypi/pyserial .. _py-spidev: https://pypi.python.org/pypi/spidev .. _py-opc: https://pypi.python.org/pypi/py-opc .. Cookiecutter: https://github.com/audreyr/cookiecutter .. audreyr/cookiecutter-pypackage: https://github.com/audreyr/cookiecutter-pypackage .. _Waggle's alphasense.py: https://github.com/waggle-sensor/waggle