Example Projects¶
This section provides complete example projects demonstrating how to use the BenHW SDK with C/C++, Python, and .NET.
Download Examples¶
Download a complete set of example projects:
What’s Included¶
Example code¶
The Python example (python/main.py), the .NET example (dotnet/Program.cs), the C example
(c/main.c, using the flat C API in benhw.h), and the C++ example (cpp/main.cpp, using
the object-oriented wrapper in benhw.hpp) all demonstrate the same wavelength scan:
Loading system configuration and setup files
Initializing the hardware
Parking the hardware
Selecting wavelength
Performing measurements
The example projects reference the configuration files in the config folder using relative paths.
They provide a starting point that you can modify for your specific hardware configuration and measurement requirements.
Configuration Files¶
The config folder contains:
system.cfg- System configuration file defining hardware componentssystem.atr- Setup file with instrument settings
The example projects are configured to reference these files.