upm  0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
Public Member Functions | List of all members

API for the GUVA-S12D UV Sensor. More...

Detailed Description

UPM module for the GUVA-S12D UV sensor

guvas12d.jpg
// Instantiate a GUVAS12D on analog pin A3
while (true) {
float value = volts.value(GUVAS12D_AREF, SAMPLES_PER_QUERY);
System.out.println("AREF: " + GUVAS12D_AREF
+ ", Voltage value (higher means more UV): " + value);
Thread.sleep(1000);
}

Public Member Functions

synchronized void delete ()
 
 GUVAS12D (int pin)
 
float value (float aref, long samples)
 

Constructor & Destructor Documentation

GUVAS12D ( int  pin)

GUVA-S12D UV sensor constructor

Parameters
pinAnalog pin to use

Member Function Documentation

float value ( float  aref,
long  samples 
)

Gets the average voltage value from the sensor

Parameters
arefReference voltage in use (usually 5.0 V or 3.3 V)
samplesNumber of samples to average over
Returns
Average voltage reading

The documentation for this class was generated from the following file: