test

Dependencies:   mbed

LightControl.cpp

Committer:
mbaverso
Date:
2017-07-08
Revision:
0:d0a11603dd8e

File content as of revision 0:d0a11603dd8e:

// 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());
        }
    }
}