The Grove – UV Sensor is used for detecting the intensity of incident ultraviolet(UV) radiation. This form of electromagnetic radiation has shorter wavelengths than visible radiation. The Grove - UV Sensor is based on the sensor GUVA-S12D which has a wide spectral range of 200nm-400nm. The module outputs electrical signal which varies with the UV intensity.

Dependencies:   mbed

Fork of Seeed_Grove_UV_Sensor_Example by Austin Blackstone

main.cpp

Committer:
mbedAustin
Date:
2014-09-05
Revision:
0:26a3a6edbb11

File content as of revision 0:26a3a6edbb11:

#include "mbed.h"

AnalogIn sensorUV(A0);

int main() {
    float value;
    while (true) {
        value = sensorUV;
        printf("\rUV Value = %3.2f%%",value*100);
        wait(.1);
    }
}