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: EthernetInterface HttpServer mbed-rpc mbed-rtos mbed
Fork of 08-01-Uebung by
Revision 13:9ac1a340866e, committed 2015-03-21
- Comitter:
- stefan1691
- Date:
- Sat Mar 21 10:07:09 2015 +0000
- Parent:
- 12:9281320e8687
- Commit message:
- Daemmerungsschaltung ergaenzt
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Mar 21 09:56:42 2015 +0000
+++ b/main.cpp Sat Mar 21 10:07:09 2015 +0000
@@ -11,13 +11,21 @@
// Servo + aktuelle Werte
AnalogIn light( A1 );
+DigitalOut d10( D10 );
float val1;
Ticker sensors;
// Update Sensor Werte
void updateVal()
{
+ // Variable RPC zur Verfuegung stellen
val1 = light;
+
+ // Licht bei Daemmerung einschalten
+ if ( light < 0.04f )
+ d10 = 1;
+ else
+ d10 = 0;
}
int main()
