smd.iotkit.ch / Mbed 2 deprecated 0-06-01-Uebung

Dependencies:   mbed

Fork of 06-01-Uebung by th.iotkit.ch

main.cpp

Committer:
stefan1691
Date:
2015-04-18
Revision:
4:be63bf4e87aa
Parent:
3:6dfb04216698
Child:
5:859a37864a31

File content as of revision 4:be63bf4e87aa:

/** 6.1 Licht bei Dämmerung einschalten
*/

#include "mbed.h"

AnalogIn   light( A1 );
DigitalOut  led( D10 );             // 1. LED auf thShield

int main()
{
    while ( true ) 
    {
        printf( "Aktueller Wert %f\n", light.read() );
        
        // fuer Dunklen Kursraum
        if  ( light < 0.1f )
            led = 1;
        else
            led = 0;
        wait( 1.0 );
    }
}