Update WT32_ETH01 examples

Using correct `WT32_ETH01_isConnected()` for Ethernet status
This commit is contained in:
Khoi Hoang
2022-03-22 13:23:17 -04:00
committed by GitHub
parent c07a5e4761
commit 3eed2218ce
2 changed files with 2 additions and 6 deletions

View File

@ -79,15 +79,13 @@ IPAddress mySN(255, 255, 255, 0);
// Google DNS Server IP
IPAddress myDNS(8, 8, 8, 8);
bool eth_connected = false;
/////////////////////////////////////////////
void heartBeatPrint(void)
{
static int num = 1;
if (eth_connected)
if (WT32_ETH01_isConnected())
Serial.print(F("H")); // H means connected to WiFi
else
Serial.print(F("F")); // F means not connected to WiFi

View File

@ -79,15 +79,13 @@ IPAddress mySN(255, 255, 255, 0);
// Google DNS Server IP
IPAddress myDNS(8, 8, 8, 8);
bool eth_connected = false;
/////////////////////////////////////////////
void heartBeatPrint(void)
{
static int num = 1;
if (eth_connected)
if (WT32_ETH01_isConnected())
Serial.print(F("H")); // H means connected
else
Serial.print(F("F")); // F means not connected