Skip to main content

This module provides Python bindings for DGILib.

Project description

Pydgilib provides python bindings for Atmel® Data Gateway Interface (DGI) devices. See the Data Gateway Interface user guide for further details. This package works best if you have Atmel Studio 7.0 installed. If you do it will automatically make use of the installed files it requires. Otherwise you can download the required DLL from Atmel here and point pydgilib to the location where you downloaded the file.

Features

The main features of this library are:

  • It wraps the C functions of DGILib in python functions

  • It provides a class to easily log data from the power and gpio interfaces to a .csv file or a plot (using matplotlib)

  • It provides a function that wraps atprogram.exe and make.exe so it can compile projects and flash them to a board

The documentation of all the functions can be found in this overview or this list.

Installation

You will need to install pydgilib in a 32-bit Python environment on Windows because DGILib.dll is compiled for 32-bit. Other operating systems are not supported.

Installation via pip

Normal installation:

$ pip install pydgilib

Static Installation

If you want to install a static copy of the master you can run:

$ pip install git+https://github.com/EWouters/pydgilib

Development Installation

  1. Clone the repo:

    $ git clone https://github.com/EWouters/pydgilib.git
  2. Install symlinked to repo:

    $ pip install -e .

If you want to be able to run the tests or compile the docs run instead:

$ pip install -e .[test,docs]

Getting Started

  1. Connect your device that supports DGI

  2. Print the serial number of your device:

    >>> from pydgilib import DGILib
    >>> with DGILib() as dgilib:
    ...     print(dgilib.device_sn)
    ...
    b'ATML3138061800001604'
  3. Log the current of the board and the states of the gpio pins for one second and write the results to .csv files:

    >>> from pydgilib_extra import DGILibExtra
    >>> with DGILibExtra() as dgilib:
    ...     dgilib.logger.log(1)
    ...
  4. Log the current of the board and the states of the gpio pins for one second and show a plot of the results:

    >>> from pydgilib_extra import DGILibExtra, LOGGER_PLOT
    >>> with DGILibExtra(loggers=[LOGGER_PLOT]) as dgilib:
    ...     dgilib.logger.log(1)
    ...
    {48: <pydgilib_extra.dgilib_data.InterfaceData object at 0x00F22A90>, 256: <pydgilib_extra.dgilib_data.InterfaceData object at 0x00F229F0>}
plot example

Plot of a SAML11 board running the unit test project.

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

pydgilib-0.2.3.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

pydgilib-0.2.3-py3-none-any.whl (48.9 kB view details)

Uploaded Python 3

File details

Details for the file pydgilib-0.2.3.tar.gz.

File metadata

  • Download URL: pydgilib-0.2.3.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for pydgilib-0.2.3.tar.gz
Algorithm Hash digest
SHA256 4cf093fca7e84d6586afc9f0d470347f04cbcb24ed25f8fabb81c8c1f0291548
MD5 c20b6f52434d315b602a3dc46bec7e1d
BLAKE2b-256 49d3529e84df3e70febcff2d38dd8c15069da0a66a33efb34112b727a4953edd

See more details on using hashes here.

File details

Details for the file pydgilib-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: pydgilib-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 48.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8

File hashes

Hashes for pydgilib-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d8ade417d3d4a5dc103b89f2c9c8c07c2e51d6faec3eebe27e192008b94b219f
MD5 490ec7798738d592b1411c704a5b6adb
BLAKE2b-256 e2871de5e7fa50bb10944689dfabd482ebfa2a91f0c3c8653a0a5bb5ac3ba9da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page