User Tools

Site Tools

Translations of this page?:

en:pymlab

This is an old revision of the document!


FIXME This page is not fully translated, yet. Please help completing the translation.
(remove this paragraph once the translation is finished)

Universal communication library pymlab

It is software package wich allows creation of sensor network based on RS232, I²C, Ethernet and USB interfaces. It is the first experimental implementation of polymorphous device network.

The function principle is based on definig of the network structure and addresses of each network node. Whole configuration is described in configuration file of the control software which is usually writen in Python. Physical routing between I2C bus segments which contains sesnors with the same i2c addersses, is realised by I2Chub02A modules. Source files of the library and use examples you can found in pyMLAB repository at MLAB group on Github.

The result is a opportunity to test and demonstrate every new sensor and device without need of maintain specific sourcefiles for every used MCU. It brings code independence on mictrocontroler architecture even in case if firmware generation will be possible from Python source code.

Installation

If you use Python package version of pymplam you should execute this command.

sudo easy_install pymlab

or

sudo pip install pymlab

Both commands are equivalent and uses the python packaging system. Intallation procedury automatically installs dependencies. But it cannot install libusb which needs to be installed manually.

sudo apt-get install libudev-dev libusb-1.0-0-dev libhidapi-dev python-setuptools python-smbus cython 

If you need to use USB as connetion interface for the device you should use the USBI2C01A module. The module needs hidapi software interface and other dependencies.

Development version

Up to date version of pymlab library is on gitbub. We should install it in the system in order of the library development.

git clone https://github.com/MLAB-project/MLAB-I2c-modules.git
git checkout dev
sudo python setup.py develop

User usualy needs permissions to access the I²C and USB bus. Therefore user must be added to i2c group by:

sudo adduser kaklik i2c

The change will take effect on a next user login.

TODO

Graphical interface

Graphical interface to the pymlab library will be usefull for defining of network topology and ploting of graphs from sensors connected to network. One possible software which could be used is PyQtGraph.

ARM STM32 Python interpreter

Pyhthon interpreter should be useful if pymlab would be used at ARM microcontrolers. One example of possible interpreter is Python on a chip.

en/pymlab.1463247101.txt.gz · Last modified: 2016/05/14 17:31 (external edit)