12. Zadatak Luka Gotić, Zvonimir Belić, Hrvoje Škrnjug

Dependencies:   TextLCD mbed

main.cpp

Committer:
hskrnjug
Date:
2016-12-01
Revision:
0:d9940d470c05

File content as of revision 0:d9940d470c05:

#include "mbed.h"
#include "TextLCD.h"
TextLCD lcd(p19, p20, p21, p22, p23, p24,TextLCD::LCD8x2);
float lux;
AnalogIn Ain(p17);
DigitalOut LED(p25);
int main()
{
    while(1) {
        lux=Ain*600;
        lcd.printf("%.2f", lux);
        if(lux<100) {
            LED=0;
        } else LED=1;
        wait(0.1);
        lcd.cls();
    }
}