Skip to content

Commit

Permalink
Fixed ESP32 StaticIP example
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisxhe committed Mar 16, 2024
1 parent c8ba8f0 commit bf1c388
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/StaticIPAddress/StaticIPAddress.ino
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@
*
*/
#include <Arduino.h>
// #include <ETH.h>
#if CONFIG_IDF_TARGET_ESP32
#include <ETH.h>
#else
#include <ETHClass.h> //Is to use the modified ETHClass
#endif
#include <SPI.h>
#include <SD.h>
#include "utilities.h" //Board PinMap

//Change to IP and DNS corresponding to your network, gateway
IPAddress staticIP(192, 168, 0, 113);
IPAddress gateway(192, 168, 0, 1);
IPAddress staticIP(192, 168, 36, 244);
IPAddress gateway(192, 168, 36, 1);
IPAddress subnet(255, 255, 255, 0);
IPAddress dns(192, 168, 0, 1);
IPAddress dns(192, 168, 36, 1);

static bool eth_connected = false;

Expand Down

0 comments on commit bf1c388

Please sign in to comment.