| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository is no longer supported, please consider using picosdk-python-wrappers instead.
This repository contains an example Python module for PicoScope oscilloscopes.
Notes: The code is not much different from Python3 and can be easily converted with the 2to3 utility. The module has been tested and proved working on Linux (including ARM derivatives), Microsoft Windows and Mac OS X.
Drivers are available for the following platforms. Refer to the subsections below for further information.
A distutils installer is provided. After you have installed the PicoSDK driver package (see above), the Python installer can be used as follows:
python setup.py install
On macOS and Linux you will either need to use sudo with this command, to install into the system folders, or to install for the current user only you can use:
python setup.py install --user
Within python, the library for import is called picosdk.
Note: A basic script requires just a few lines as below. Most functions have been decorated with docstrings.
from picosdk import ps2000
if __name__ == "__main__":
ps = ps2000.Device()
status = ps.open_unit()
if status == ps.m.pico_num("PICO_OK"):
s, state = ps.get_channel_state(channel=ps.m.Channels.A)
state.enabled = True
state.range = ps.m.Ranges.r5v
status = ps.set_channel(channel=ps.m.Channels.A, state=state)
if status == ps.m.pico_num("PICO_OK"):
s, index = ps.locate_buffer(channel=ps.m.Channels.A,
samples=1000,
segment=0,
mode=ps.m.RatioModes.raw,
downsample=0)
status = ps.collect_segment(segment=0, interval=1000)
if status == ps.m.pico_num("PICO_OK"):
status, data = ps.get_buffer_volts(index=index)
print data
exit(0)
print ps.m.pico_tag(status)You can download Programmer's Guides providing a description of the API functions for the relevant PicoScope or PicoLog driver from our Documentation page.
Please visit our Support page to contact us directly or visit our Test and Measurement Forum to post questions.
Contributions are welcome. Please refer to our guidelines for contributing for further information.
The following are Python examples written by our customers:
The following is a fork of this repository:
See LICENSE.md for license terms.
PicoScope and PicoLog are registered trademarks of Pico Technology Ltd.
Windows is a registered trademark of Microsoft Corporation.
Mac and OS X are registered trademarks of Apple, Inc.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Copyright © 2014-2018 Pico Technology Ltd. All rights reserved.
| Back | FazBrowse Home | New Git URL |