A simulated device for measuring LED characteristics.
Project description
nsp2visasim
This package contains a simulation of an Arduino VISA device connected to a small circuit to measure the voltage versus current characteristics of a LED. It is created for a programming course in the physics and astronomy joint degree bachelor programme at the Vrije Universiteit and the University of Amsterdam. Students use the actual device and circuit while on campus. This package simulates this firmware.
Usage
In your controller code, replace:
import pyvisa
with:
try:
from nsp2visasim import sim_pyvisa as pyvisa
except ModuleNotFoundError:
import pyvisa
Then, if you use Poetry, add it to your existing project with:
poetry add --group dev nsp2visasim
If you don't use Poetry, install nsp2visasim with:
pip install nsp2visasim
You now appear to have an additional VISA device connected to your system. If an actual Arduino is attached, you can choose to open the simulation or the actual Arduino by selecting the correct port name. Your code should work exactly the same as before.
A session might look like this:
$ diode list
The following devices are connected to your computer:
ASRL/dev/cu.URT1::INSTR
ASRL/dev/cu.URT2::INSTR
ASRL/dev/cu.Bluetooth-Incoming-Port::INSTR
ASRL/dev/cu.usbmodem14501::INSTR
ASRL::SIMLED::INSTR
$ diode info SIMLED
Device identification: Simulated Arduino VISA firmware (LED experiment)
$ diode measure SIMLED -v 2.5 -n 10
Measured current through diode: 3.048 +- 0.030 mA @ 1.805 +- 0.011 V.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nsp2visasim-1.4.1.post2.tar.gz.
File metadata
- Download URL: nsp2visasim-1.4.1.post2.tar.gz
- Upload date:
- Size: 509.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.13.1 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b60c729fbee5103b1176a4e5444e28f4dae9da436b3340e8a4b64ca845ec3fad
|
|
| MD5 |
9e9e34a74e7681323e6735ae4148bc8e
|
|
| BLAKE2b-256 |
aa9d81225aa69bc453f6c76e5792c38185c943c08403a336f39d9f145ab27808
|
File details
Details for the file nsp2visasim-1.4.1.post2-py3-none-any.whl.
File metadata
- Download URL: nsp2visasim-1.4.1.post2-py3-none-any.whl
- Upload date:
- Size: 508.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.5 CPython/3.13.1 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeaa6f93d4303589e1f1a402d47cc2cacf2502f52243453e3726d0e6e142d858
|
|
| MD5 |
0923dec90cee3584628bd2ea02d56011
|
|
| BLAKE2b-256 |
e6961f4df3b16e2f6268d6654a6518ae6e9197556a2d469bc61acdfeb1422286
|