for textbook v4.4

Dependencies:   mbed

Connection

Vcc → 3.0V ~ 5.1V (supply voltage)

GND → GND

SIG → p15 (mbed AnalogIn)

NC → Non connection

Files at this revision

API Documentation at this revision

Comitter:
mbedAustin
Date:
Fri Sep 05 03:00:54 2014 +0000
Child:
1:d583c567fcfe
Commit message:
Seeed Grove UV Sensor example. Very simple initial commit. Takes in voltage from ADC and reports it to the user via terminal as % of total voltage. ~10% = indoors

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Sep 05 03:00:54 2014 +0000
@@ -0,0 +1,12 @@
+#include "mbed.h"
+
+AnalogIn sensorUV(A0);
+
+int main() {
+    float value;
+    while (true) {
+        value = sensorUV;
+        printf("\rUV Value = %3.2f%%",value*100);
+        wait(.1);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Sep 05 03:00:54 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file