An interface that enables the use of SCPI commands for the tinySA
Project description
tinySCPI
A Python library that enables the use of SCPI commands on the tinySA.
See the Commands documentation for each command and a description.
Table of Contents
Getting Started
- Create a new Python file.
- In your terminal/command line, install the tinySCPI library by typing
pip install tinyscpi
- Copy and paste the below code into your Python file.
from tinyscpi import tinySCPI
print(tinySCPI.user_input("*IDN?"))
- Connect the tinySA device to your computer via USB. Your device should have come with said cable.
- Run the file using the line below. Ensure your command-line/terminal is in the same path as your Python file!
python3 <name_of_your_file>.py
This should return something similar to this, it will usually be specific to your device but in a similar format:
Running info
tinySA v0.3
2019-2022 Copyright @Erik Kaashoek
2016-2020 Copyright @edy555
SW licensed under GPL. See: https://github.com/erikkaashoek/tinySA
Version: tinySA_v1.3-506-g8291e1e
Build Time: Nov 28 2022 - 14:01:16
Kernel: 4.0.0
Compiler: GCC 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
Architecture: ARMv6-M Core Variant: Cortex-M0
Port Info: Preemption through NMI
Platform: STM32F072xB Entry Level Medium Density devices
ESD protected
- Now you're ready to execute any of the commands located in the Command Tree!
- If you're looking for a taste of what you're capable of with tinySCPI, see this Example Script
- To see what other functions are a part of our library see the Class Documentation
Dependency:
tinySCPI requires python >= 3.6, pyserial, pytest, and pytest-cov
pip install pyserial
pip install pytest
pip install pytest-cov
Unit Test:
pytest
is required to execute unit tests.
You can install pytest library by typing pip install pytest
in your terminal/command line
You can execute unit tests by typing pytest
in your terminal/command line root directoryscpi`
Coverage:
pytest
and pytest-cov
are required to execute code coverage analysis.
You can install pytest andn pytest-ocv library by typing pip install pytest pytest-cov
in your temrinal/command line.
You can execute unit tests by typing pytest --cov-config=.coveragerc --cov=tinyscpi tinyscpi/tests/ --cov-report html
After the execution you will be able to find the coverage report at ./htmlcov/index.html
Contact Us:
Email: tinyscpi@vt.edu
Safety:
Like with all RF devices, there involves some risk in operation. For more information, please refer to Safety.
Output:
On older firmware, output mode control over serial may not be stable and can return the "FATAL ERROR" message on screen. Updating to a newer firmware seems to resolve this issue.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tinyscpi-1.0.1.tar.gz
.
File metadata
- Download URL: tinyscpi-1.0.1.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5299e049732bbba7053d46a009d2c220403436695926b3b3a24d198861b0f352 |
|
MD5 | 8d752f371252517d97113ca92d0fce06 |
|
BLAKE2b-256 | de78ada436e499970f54ac731908581a340b196e1d15490987af6534b8e55838 |
File details
Details for the file tinyscpi-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: tinyscpi-1.0.1-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9529b126b9280b105a6532aa741934be28a126d40fe2f6e3ef362af2e864f737 |
|
MD5 | 3116e358d6578824cc152c863efec18c |
|
BLAKE2b-256 | 64a0e57776e0a86f5e784dac97cfb49077e8d5c3bee8f1ab1a13c6798bbc7225 |