Grove UVsensor program
Connection
Vcc → 3.0V ~ 5.1V (supply voltage)
GND → GND
SIG → p15 (mbed AnalogIn)
NC → Non connection
main.cpp
- Committer:
- HeptaSatTraining2019
- Date:
- 2019-11-06
- Revision:
- 1:d583c567fcfe
- Parent:
- 0:26a3a6edbb11
File content as of revision 1:d583c567fcfe:
#include "mbed.h" AnalogIn sensorUV(p15); float UVvalue; int main() { while (true) { UVvalue = sensorUV; printf("\rUV Value = %3.2f%%\r\n",UVvalue*100); wait(1.0); } }