High level Python bindings for the libarc2 library
Project description
Python bindings for libarc2
Introduction
This library presents a python interface to the low-level libarc2
library
used to interface with ArC TWO™. Most of the user-facing facilities of
libarc2
are present in this library. That being said, pyarc2
itself is
still relatively low-level and a general understanding of the internals of
ArC TWO is required.
Use
pyarc2
maps most of the functionality of libarc2
so the API translates
fairly transparent. Most of the interaction with ArC TWO will be through the
Instrument
class that encapsulates the implemented functionality of
libarc2
. The library will keep being updated as new functionality is added.
For instance to read the current between two channels you can write
from pyarc2 import Instrument, find_ids
# low voltage channel (typically grounded)
LOWV = 7
# high voltage channel
HIGHV = 33
# read-out voltage
VREAD = 0.2
# Get the ID of the first available ArC TWO
arc2id = find_ids()[0]
# firmware; shipped with your board
fw = 'arc2fw.bin'
# connect to the board
arc = Instrument(arc2id, fw)
current = arc.read_one(LOWV, HIGHV, VREAD)
print('I = %g A' % current)
Additional functionality
pyarc2
can also be used to implement new plugins based on libarc2
. Access
to the lower level object is done via Instrument::inner()
and
Instrument::inner_mut()
. These plugins can fully leverage libarc2
functionality but require some familiarity with Rust and the libarc2
API.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pyarc2-0.1.0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b5cbab59110d89ac86043360591177331329bc6236a0ad62852af9a14f50461 |
|
MD5 | 2dbde6d139ffba49b0a00cfe48e01cf2 |
|
BLAKE2b-256 | 2bf43f55e96686f2b16f2ed15e57557a99d6b170caf2ca2868dee5d95d3cc350 |
Hashes for pyarc2-0.1.0-cp310-cp310-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 343e779667b471e6764426cada9c9860fff24b0d70b89df1c8ff802e6b37eec4 |
|
MD5 | 12e15cfa2783b24aa7a554fc48635b20 |
|
BLAKE2b-256 | 872a42d7d95f58c1fa29dcc11d1dd3dc257613879bdaa4d1b573d97ef9080997 |
Hashes for pyarc2-0.1.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 031c7f35016291b15da9c31169d8d3b2400f0b7f9e32eff19977a5c6001cbd0d |
|
MD5 | 0e9ca3f220eb43c148dc23b413fac341 |
|
BLAKE2b-256 | 122e133641de7331d19df92adde6ae5ea5b69db4d42851066b2ee45065302f82 |
Hashes for pyarc2-0.1.0-cp39-cp39-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ff3c76cc089afd000d076120f85e424c77b79e2c3f775db857d98d69ebfa6f0 |
|
MD5 | 56c47e4cd82581dac1efe8a927e30fd1 |
|
BLAKE2b-256 | bad39a792555d39518883522114674ae411c3104dfebc692dc1259254bb8326d |
Hashes for pyarc2-0.1.0-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6af65d227f817b8406878d2cbe4217f2a119680c42e442e28217580a1904eb9 |
|
MD5 | 0abdb4a71fadcd1bc0a86a174b832d5a |
|
BLAKE2b-256 | b153417357cbe882ff388aa02e9cd54654efd1e0823d6e3ac9084eb237420589 |
Hashes for pyarc2-0.1.0-cp38-cp38-manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38a3d97e2d9eee491747d7b81e4cd62820b3b516c2746f8d343445dc596745a5 |
|
MD5 | f273f024395a1f873106ece6f7cccd92 |
|
BLAKE2b-256 | 26c87d247d30320411d540e52a887d5a8e24e3cc1d8907f6bbb50ec56ebeeb57 |