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.
Revision 1:ca871bdef133, committed 2021-06-03
- Comitter:
- jack1930
- Date:
- Thu Jun 03 15:04:50 2021 +0000
- Parent:
- 0:1f9f0461419d
- Commit message:
- Getreidetrocknung Zustand Geruest
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Jun 02 10:57:16 2021 +0000
+++ b/main.cpp Thu Jun 03 15:04:50 2021 +0000
@@ -7,7 +7,7 @@
#include "LCD.h"
lcd mylcd;
-int zeit= 20; //Zeit in ms
+int zeit= 100; //Zeit in ms
PortOut zustand(PortC,0b1111);
DigitalOut warnlampe(PC_7);
@@ -29,33 +29,18 @@
mylcd.printf("%s",txt);
}
-void trocknenEin()
-{
- if (zustand==Aus)
- {
- zustand=Anlaufen;
- melden("Anlauf");
- }
+void trocknenEin(){
+}
+
+void trocknenAus(){
}
-void trocknenAus()
-{
- if (zustand==Betrieb)
- {
- zustand=Abschalten;
- melden("Abschalten");
- }
-}
-
-void init()
-{
+void init(){
TrocknenEin.mode(PullDown);
TrocknenAus.mode(PullDown);
- Lichtschranke.mode(PullDown);
-
+ Lichtschranke.mode(PullDown);
TrocknenEin.rise(&trocknenEin);
- TrocknenAus.rise(&trocknenAus);
-
+ TrocknenAus.rise(&trocknenAus);
zustand=Aus;
}
@@ -65,23 +50,7 @@
melden("bereit");
while (true) {
- switch(zustand)
- {
- case Anlaufen:
- if (Lichtschranke==1)
- {
- zustand=Betrieb;
- melden("Betrieb");
- }
- break;
- case Abschalten:
- if (Lichtschranke==0)
- {
- zustand=Aus;
- melden("bereit");
- }
- break;
- }
+
HAL_Delay(zeit);
}