VEML6075 UV Sensor
This documentation includes installation guidelines and sample code for your hardware.
Windows 10 IoT Core Library
VEML6075Sensor library is responsible for communicating with the VEML6075 UV sensor.
To use the library, add the following using statement to the top of your C# code.
Then, create an instance of the VEML6075Sensor class.
Now you're ready to access the library by calling the veml instance.
Initialization
VEML6075Sensor
Initiates the VEML6075 sensor to get UVA, UVB and UVIndex.
Parameters
None
Basic Members
Calculate Average UV Index
Calculates the Average UV Index.
Parameters
None
Returns
Double: Average UV Index.
Calculate UV Index A
Calculates the UV Index A.
Parameters
None
Returns
Double: UV Index A.
Calculate UV Index B
Calculates the UV Index B.
Parameters
None
Returns
Double: UV Index B.
Advanced Members
Configure Sensor
Configures the VEML6075 sensor. Verifies if the settings are stored.
Parameters
IntegrationTime UV_IT: UV integration time.
DynamicSetting HD: Dynamic setting.
Trigger UV_TRIG: Measurement trigger.
ActiveForceMode UV_AF: Active force mode.
PowerMode SD: Power mode.
Returns
Bool: True if settings are stored. False if not.
Trigger One Measurement
Triggers one time measurement for Active Force Mode enabled scenarios.
Parameters
None
Returns
None
Calculate Compensated UVA
Calculates compensated UVA.
Parameters
None
Returns
Double: Compensated UVA.
Calculate Compensated UVB
Calculates compensated UVB.
Parameters
None
Returns
Double: Compensated UVB
Read RAW UVA
Reads RAW UVA.
Parameters
None
Returns
UInt16: RAW UVA Value.
Read RAW UVB
Reads RAW UVB.
Parameters
None
Returns
UInt16: RAW UVB Value.
Read RAW UVD
Reads RAW UVD.
Parameters
None
Returns
UInt16: RAW UVD Value.
Read RAW UV COMP 1
Reads Noise Compensation Channel 1 data which allows only visible noise to pass through.
Parameters
None
Returns
UInt16: UV Comp 1 Value.
Read RAW UV COMP 2
Reads Noise Compensation Channel 2 data which allows only infrared noise to pass through.
Parameters
None
Returns
UInt16: UV Comp 2 Value.
Disposal
To clean up the resources used by the class, call the Dispose() method it when the application is closing.
This method cleans the resources used by the class.
Samples
You can copy the example code from https://github.com/Turta-io/IoTHAT/tree/master/Samples/Windows10IoTCore address. There is one example of this library.
VEML6075 Sample App
This application demonstrates reading UV data from the sensor.
To run the example:
Open the sample project you downloaded.
Make sure "ARM" is selected from the solution platforms selection.
Deploy the sample to the Raspberry Pi using the "F5" key.
Sample Code
Result
When you run the sample, it prints the UV data to the Visual Studio Output / Immediate Window.
To stop the application, use the "Stop" button on the Visual Studio.
Last updated