Loesung Jalousiesteuerung ohne Lamellen
Dependencies: LCD_i2c_GSOE ESP8266WebserverGSOE
Revision 15:d7bf54f9437b, committed 2021-08-09
- Comitter:
- jack1930
- Date:
- Mon Aug 09 14:18:37 2021 +0000
- Parent:
- 14:82b13edfe4e7
- Commit message:
- kleine Aenderungen
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 82b13edfe4e7 -r d7bf54f9437b main.cpp --- a/main.cpp Mon Aug 09 12:53:14 2021 +0000 +++ b/main.cpp Mon Aug 09 14:18:37 2021 +0000 @@ -72,18 +72,6 @@ } } -void init() -{ - zustand=Steht; - TO.mode(PullDown); - TO.rise(&endschalterOben); - TO.enable_irq(); - TU.mode(PullDown); - TU.rise(&endschalterUnten); - TU.enable_irq(); - __enable_irq(); -} - void anzeigen() { myWebserver.send(200,"text/html",getRootPage()); @@ -117,9 +105,17 @@ myWebserver.send(200,"text/html",getRootPage()); } - -int main() { - init(); +void init() +{ + zustand=Steht; + TO.mode(PullDown); + TO.rise(&endschalterOben); + TO.enable_irq(); + TU.mode(PullDown); + TU.rise(&endschalterUnten); + TU.enable_irq(); + __enable_irq(); + myWebserver.on("/Hoch",&hoch); myWebserver.on("/Runter",&runter); myWebserver.on("/Anzeigen",&anzeigen); @@ -128,6 +124,14 @@ myLCD.clear(); myLCD.cursorpos(0); myLCD.printf("%s",myWebserver.gibIP()); +} + + + + +int main() { + init(); + while(1) { myWebserver.handleClient(); switch (zustand)