usbadc10 protocol python binding.
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
# Format for MacOS: com:///dev/tty.usbmodem000001234
device_uri = r'com:\\.\COM5'
# Create and open device instance
device = Usbadc10DeviceHandle(device_uri)
# Read raw data
raw_data_all_channels = list(device.get_conversion_raw().data)
print("List of raw ADC counts from all channels:\n", raw_data_all_channels)
# Read voltages in (10 * mV) units
voltage_all_channels = list(device.get_conversion().data)
print("List of voltages from all channels (in 10 * mV):\n", voltage_all_channels)
# Convert measurements to mV
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/
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.2.tar.gz
(3.2 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file usbadc10-1.0.2.tar.gz.
File metadata
- Download URL: usbadc10-1.0.2.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c74a533b5484314f273e06e50b18582b707ea2bf16543f75d546eeff8cfeae00
|
|
| MD5 |
de38c07738987999479ea551de173fb1
|
|
| BLAKE2b-256 |
c0d8b63f7bc13e821523b0ec31ca29a16023f891314fb851084cd8ceeb8fe591
|
File details
Details for the file usbadc10-1.0.2-py3-none-any.whl.
File metadata
- Download URL: usbadc10-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
385ecea8618cbacae92c687e4556a2c2141fb3020cec91f2653d4697d32afb64
|
|
| MD5 |
691546f4b9ada5ef82aaf6affce4d29e
|
|
| BLAKE2b-256 |
cd6fe3c8eb7c72255b85315253f767bda42cfd8d463d0bf3b7921ada46a51879
|