HEPTA-Sat Training 2022 / Mbed 2 deprecated Lab7-sample_uv-sensor

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 AnalogIn sensorUV(p15);
00003 float UVvalue;
00004 int main() {
00005     while (true) {
00006         UVvalue = sensorUV;
00007         printf("\rUV Value = %3.2f%%\r\n",UVvalue*100);
00008         wait(1.0);
00009     }
00010 }