The current USB based sensors from sglux present a virtual serial port to the USB host. They employ the royalty free Modbus protocol to transmit measurement data and receive configuration data.
The examples are valid for all UV sensor probes from sglux with the option "USB output".
Examples of such sensors are: UV surface, UV cosine and UV air probes.
Please download the latest code from ZIP oder clone the repository.
Extract to a folder of your choice. Then locate your shell to that folder, no matter if you are on Windows (CMD or powershell) or Linux (bash or whatever shell you prefer).
Check or install the required packages, for instance by calling pip install -r requirements.txt
once.
Start the individual examples by typing python example-1-sensor-summary.py
and so on.
This example reads parameters and captures 100 consecutive readings from the first sglux USB sensor detected on the system (further sensors are ignored). The gathered data is written do a CSV file (placed in the current folder) displayed in the terminal as well.
Start it by typing python example-1-sensor-summary.py
Click here for further details.
If you discover an issue or somthing does not work as expected please first start a discussion before opening an issue ticket (as these are reserved for bugs not support ;-)
Thank you!