Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of 06-01-Uebung by
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 );
}
}
