This repository has been archived by the owner on Dec 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from flojoy-ai/dallas/instrument-prs-from-nodes
Transfer instrument PRs from nodes repo
- Loading branch information
Showing
94 changed files
with
23,451 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
blocks/HARDWARE/INSTRUMENTS/OSCILLOSCOPES/PICO/PICO2000/CONNECTION_2000/CONNECTION_2000.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from flojoy import flojoy, DataContainer, TextBlob | ||
from typing import Optional | ||
import ctypes | ||
from picosdk.ps2000 import ps2000 as ps | ||
from picosdk.functions import assert_pico2000_ok | ||
|
||
|
||
@flojoy(deps={"picosdk": "1.1"}) | ||
def CONNECTION_2000( | ||
default: Optional[DataContainer] = None, | ||
) -> TextBlob: | ||
"""The CONNECTION_2000 node connects Flojoy to an available Picoscope. | ||
If more than one P2000 oscilloscope is available, the first one connected | ||
to the PC will likely be chosen. If you need specific device selection, | ||
please contact us at: https://www.flojoy.ai/contact-sales. | ||
Note the P2000 nodes require a device specific driver/SDK downloaded from: | ||
https://www.picotech.com/downloads. | ||
Parameters | ||
---------- | ||
None | ||
Returns | ||
------- | ||
TextBlob | ||
Placeholder return currently | ||
""" | ||
|
||
ps.ps2000_close_unit(ctypes.c_int16(1)) | ||
|
||
status = {} | ||
status["openUnit"] = ps.ps2000_open_unit() | ||
assert_pico2000_ok(status["openUnit"]) | ||
|
||
return TextBlob(text_blob=str(status["openUnit"])) |
Binary file added
BIN
+187 KB
blocks/HARDWARE/INSTRUMENTS/OSCILLOSCOPES/PICO/PICO2000/CONNECTION_2000/app.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.