A python binding for USBADC10
Project description
USBADC10
This is a python binding for usbadc10 cross-platform library for USBADC10 - a device that converts an input analog signal into a discrete code, includes 10 channels of a 12—bit ADC, an STM32 microcontroller and a USB interface that supplies power and reads digitized data.
Installation
pip install usbadc10
Minimal example
from usbadc10 import Usbadc10DeviceHandle
# Set correct device URI here
# Format for Windows: com:\\.\COM5
# Format for Linux: /dev/ttyACM0
device_uri = r'com:\\.\COM5'
device = Usbadc10DeviceHandle(device_uri)
raw_data_all_channels = list(device.get_conversion_raw().data)
print("List of raw ADC counts from all channels:\n", raw_data_all_channels)
voltage_all_channels = list(device.get_conversion().data)
print("List of voltages from all channels (in cV=10*mV):\n", voltage_all_channels)
voltage_all_channels_mV = [value/10 for value in voltage_all_channels]
print("List of voltages from all channels (in mV):\n", voltage_all_channels_mV)
# Close the device
device.close_device()
More information
- usbadc10 website: https://usbadc10.physlab.ru/ru/
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
usbadc10-1.0.1.tar.gz
(2.1 MB
view details)
Built Distribution
File details
Details for the file usbadc10-1.0.1.tar.gz
.
File metadata
- Download URL: usbadc10-1.0.1.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 44f1840d4e88e637960ccf638f4b5db64b582fced829fe5d20e32f5fd226a7bc |
|
MD5 | 484bdf9fc0704d3a60fc06c0e66af8cd |
|
BLAKE2b-256 | e7cec38b4daf2c7d3f862c2f3ec07f55398ef6511f374e89f28cef071871a082 |
File details
Details for the file usbadc10-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: usbadc10-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.18 tqdm/4.64.1 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ab54dce659d0a4b7a4a755a596bc5e4792daabdecb254eddb96b0cf6b9898ee |
|
MD5 | 1f49082fb243467d70bede2d4e247199 |
|
BLAKE2b-256 | abfc6ae282ef6fd4553dfa459815f48d02140cdb1016e8f68c5afc74572c31e1 |