Skip to main content

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.

image

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

Metadata

Release files for usbadc10 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for usbadc10 1.0.2
File Size Uploaded
usbadc10-1.0.2.tar.gz 3.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for usbadc10 1.0.2
File Interpreter ABI Platform
usbadc10-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 MB

Release files / usbadc10-1.0.2.tar.gz

Download URL usbadc10-1.0.2.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
c74a533b5484314f273e06e50b18582b707ea2bf16543f75d546eeff8cfeae00
BLAKE2b-256 checksum
How to use checksums
c0d8b63f7bc13e821523b0ec31ca29a16023f891314fb851084cd8ceeb8fe591
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / usbadc10-1.0.2-py3-none-any.whl

Download URL usbadc10-1.0.2-py3-none-any.whl
Size 3.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
385ecea8618cbacae92c687e4556a2c2141fb3020cec91f2653d4697d32afb64
BLAKE2b-256 checksum
How to use checksums
cd6fe3c8eb7c72255b85315253f767bda42cfd8d463d0bf3b7921ada46a51879
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page