hwthinker icon

Check firmware UNO R4 WiFi

hwthinker | PRO | 03/30/24 02:08:19 AM UTC | 0 ⭐ | 11224 👁️ | Never ⏰ | []
Arduino |

1.25 KB

|

None

|

0 👍

/

0 👎

/*
  Simple code to check WiFi Firmware on Arduino Uno R4 WiFi
 
  Wi-Fi support is enabled via the built-in WiFiS3 library that is shipped 
  with the Arduino UNO R4 Core. 
  Installing the core automatically installs the WiFiS3 library.
 
  ref: UNO R4 WiFi Network Examples
  https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples
*/
#include <WiFiS3.h>
 
void setup() {
  delay(500);
 
  //Initialize serial and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }
  delay(500);
  Serial.println("- Check Arduino Uno R4 WiFi firmware version -");
 
  // check for the WiFi module:
  if (WiFi.status() == WL_NO_MODULE) {
    Serial.println("Communication with WiFi module failed!");
    // don't continue
    while (true);
  }
 
  String fv = WiFi.firmwareVersion();
  Serial.println("Your WiFi firmware version is:");
  Serial.println(fv);
  Serial.println();
 
  if (fv < WIFI_FIRMWARE_LATEST_VERSION) {
    Serial.println("Please upgrade the firmware");
    Serial.println(WIFI_FIRMWARE_LATEST_VERSION);
  }
  else{
    Serial.println("It's the latest version.");
  }
}
 
void loop() {
  // put your main code here, to run repeatedly:
 
}
 

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎