");
-
- client.println("
Trochta.net:
");
-
- writeToLogAndIntoWebAsP(msg, "H3");
- //nastav jestli je post
- checkValue(request, PIN_OUT_2, "PIN2");
- checkValue(request, PIN_OUT_3, "PIN3");
-
- // Vypis aktualni hodnoty
- writeToLogAndIntoWebAsP("Input:", ElmP);
-
- for (int i = 0; i < numInputPins; i++) {
- pinState *currentState = &inputStates[i];
- writeToLogAndIntoWebAsP(ConvertStatusToString(currentState->pinNumber, false), ElmP);
- }
-
- writeToLogAndIntoWebAsP("Output:", ElmP);
- writeToLogAndIntoWebAsP(ConvertStatusToString(PIN_OUT_2, true), ElmP);
- writeToLogAndIntoWebAsP(ConvertStatusToString(PIN_OUT_3, true), ElmP);
-
- writeToLogAndIntoWebAsP("GSM Number:" + gsmPostParams.mobileNumber, ElmP);
- writeToLogAndIntoWebAsP("SMS:" + gsmPostParams.sms, ElmP);
-
- writeToLogAndIntoWebAsP("
Send SMS", "H4");
- writeToLogAndIntoWebAsP("
Save to EEPROM", ElmP);
- writeToLogAndIntoWebAsP("
Refresh", ElmP);
- // Send the time and the message that the page is loaded
- client.println("
");
- // Give the web browser time to receive the data
- client.stop();
-
- logDebug("Time: " + String(millis() / 1000));
-
- if (request.indexOf("GET /SEND-SMS") != -1) {
- SendSMS("Web Link (Test)");
- }
- // Zjkontroluje vstupni piny
-
- delay(5);
- }
-
- iterationCounter++;
- if (iterationCounter == INT_FAST16_MAX) iterationCounter = 0;
- if (iterationCounter % 5 == 0) { // Check if 10 iterations have passed
- checkInputPins(); // Call checkInputPins() every 10 iterations
- }
-
- delay(100);
-}
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..56fbf77
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,61 @@
+#include "GSMMobileDevice.h"
+//#include "WebServer.h"
+#include "PinTypeIn.h"
+#include "PinTypeOut.h"
+#include