Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #5 from flojoy-ai/dallas/instrument-prs-from-nodes
Browse files Browse the repository at this point in the history
Transfer instrument PRs from nodes repo
  • Loading branch information
39bytes authored Oct 24, 2023
2 parents 5b5192a + b0b7e1c commit ec83bd4
Show file tree
Hide file tree
Showing 94 changed files with 23,451 additions and 0 deletions.
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"]))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ec83bd4

Please sign in to comment.