Stream gap-less data from Pico Technology oscilloscopes
Project description
pico_sdk
High performance, gap-free streaming from any Pico Technology oscilloscope.
This package wraps all current Pico oscilloscope drivers in a high-level, common API written in Rust. This API is compiled to native code and exposed to Python through simple C bindings.
Supported platforms
Python >= 3.6 on:
- Windows (32/64bit)
- macOS (64bit)
- Linux (64bit)
from pico_sdk import PicoDevice
# List the available Pico devices
found = PicoDevice.enumerate()
for device in found:
print("PicoScope " + device.variant + " with serial " + device.serial)
# Open the only connected device using locally installed Pico SDKs
device = PicoDevice.open()
# Open a specific device by serial number using locally installed Pico SDKs
device = PicoDevice.open("ABC/123")
# Open a device by serial number and automatically download missing drivers
device = PicoDevice.open("ABC/123", True)
# Get device details
print("Device Serial: " + device.get_serial())
print("Device variant: " + device.get_variant())
print("Valid ranges for channel A: " +
", ".join(device.get_channel_ranges("A")))
# String case and white space are ignored
device.enable_channel("A", "200mV")
device.enable_channel("b", "20 v", "dc")
def callback(data):
# Callback data is a dictionary containing an entry for each channel
# Channel data is via numpy.ndarray containing float values in volts
print("Received streaming data...")
for channel in data:
print("Channel " + channel + " has " +
str(data[channel].size) + " samples")
device.set_callback(callback)
samples_per_second = device.start_streaming(1_000_000)
print("Streaming started with " + str(samples_per_second) + " samples per second")
input('Hit ENTER to stop and exit\n')
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
pico_sdk-0.1.2.tar.gz
(1.7 MB
view details)
File details
Details for the file pico_sdk-0.1.2.tar.gz
.
File metadata
- Download URL: pico_sdk-0.1.2.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37ac853e5505d5f0bb9ac4744521782a36e9d9a882f52e6c98d74e404b759687 |
|
MD5 | f998d7823a976324e2f940d3763be1b1 |
|
BLAKE2b-256 | d61d03243e338cdc2c0336446c6ab1ffbe926fb1e8f0e699fac369f513522614 |