mike baverso
/
LightControl
test
Diff: LightControl.cpp
- Revision:
- 0:d0a11603dd8e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LightControl.cpp Sat Jul 08 02:19:34 2017 +0000 @@ -0,0 +1,13 @@ +// Print messages when the AnalogIn is greater than 50% + +#include "mbed.h" + +AnalogIn lumens(p20); + +int main() { + while(1) { + if(lumens > 0.5) { + printf("Too hot! (%f)", lumens.read()); + } + } +}