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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File


00001 #include "mbed.h"
00003 AnalogIn sensorUV(A0);
00005 int main() {
00006     float value;
00007     while (true) {
00008         value = sensorUV;
00009         printf("\rUV Value = %3.2f%%",value*100);
00010         wait(.1);
00011     }
00012 }