Add description

main
Jarda 2023-08-21 15:29:08 +02:00
parent 93e0abe9bc
commit 7e23e437d6
1 changed files with 169 additions and 161 deletions

View File

@ -1,3 +1,9 @@
/* Webserver reads from SD text file test for LaskaKit ESPlan
* After boot connect to http://esplan.local or to IP adress of ESP32 (for example 192.168.0.98)
* Email:podpora@laskakit.cz
* Web:laskakit.cz
*/
#include <Arduino.h> #include <Arduino.h>
#include <WiFi.h> #include <WiFi.h>
#include <ETH.h> #include <ETH.h>
@ -8,7 +14,7 @@
#include <FS.h> #include <FS.h>
#include "page.h" #include "page.h"
const char *host = "esplan"; // Connect to http://ESPlan.local const char *host = "esplan"; // Connect to http://esplan.local
// SD card defines // SD card defines
#define SCK 14 #define SCK 14
@ -31,7 +37,8 @@ static bool eth_connected = false;
void WiFiEvent(WiFiEvent_t event) void WiFiEvent(WiFiEvent_t event)
{ {
switch (event) { switch (event)
{
case ARDUINO_EVENT_ETH_START: case ARDUINO_EVENT_ETH_START:
Serial.println("ETH Started"); Serial.println("ETH Started");
// set eth hostname here // set eth hostname here
@ -45,7 +52,8 @@ void WiFiEvent(WiFiEvent_t event)
Serial.print(ETH.macAddress()); Serial.print(ETH.macAddress());
Serial.print(", IPv4: "); Serial.print(", IPv4: ");
Serial.print(ETH.localIP()); Serial.print(ETH.localIP());
if (ETH.fullDuplex()) { if (ETH.fullDuplex())
{
Serial.print(", FULL_DUPLEX"); Serial.print(", FULL_DUPLEX");
} }
Serial.print(", "); Serial.print(", ");