diff --git a/ArduinoProps.vcxitems b/ArduinoProps.vcxitems index 1cb4855..a4a6dcd 100644 --- a/ArduinoProps.vcxitems +++ b/ArduinoProps.vcxitems @@ -32,6 +32,7 @@ + diff --git a/ArduinoProps.vcxitems.filters b/ArduinoProps.vcxitems.filters index 5b6ca6f..036b8bd 100644 --- a/ArduinoProps.vcxitems.filters +++ b/ArduinoProps.vcxitems.filters @@ -40,6 +40,7 @@ + diff --git a/ArduinoProps.zip b/ArduinoProps.zip index 2b00e9a..f14e4ca 100644 Binary files a/ArduinoProps.zip and b/ArduinoProps.zip differ diff --git a/Arduino_Props.md b/Arduino_Props.md index 438497e..2a4e510 100644 --- a/Arduino_Props.md +++ b/Arduino_Props.md @@ -81,6 +81,8 @@ Arduino with Ethernet or Wifi shield is suitable to build an Escape Room Props, - Arduino Ethernet - Arduino Ethernet Shield +For WiFi props, please update the WiFiNINA firmware: [WiFiNINA firmware update](WifiNinaFirmware.md). + To use other WiFi hardware compatible with any *Nick O'Leary PubSubClient* library you have to fork `WifiProps.h` and `WifiProps.cpp` and to replace `WiFiNINA.h` whih appropriate WiFi library (`ESP8266WiFi.h` for example): - Arduino WiFi Shield - Sparkfun WiFly Shield – [library](https://github.com/dpslwk/WiFly) diff --git a/EXAMPLES.md b/EXAMPLES.md index b3fe0e2..8dac8b0 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -157,6 +157,8 @@ The library comes with a number of example sketches. See **File > Examples > Ard Sketch with *WifiProps* differs slightly from code with *BridgeProps*. +Please update the WiFiNINA firmware: [WiFiNINA firmware update](WifiNinaFirmware.md). + ## 4. *BlinkOnBridgePubSub*: the Blink example on props using *PubSubClient* directly diff --git a/Props.md b/Props.md index a3ff665..77f7cbc 100644 --- a/Props.md +++ b/Props.md @@ -112,6 +112,8 @@ PropsAction clignoteAction = PropsAction(1000, clignote); ``` The *AduinoProps* library uses **WiFiNINA** WiFi library for **Arduino Uno WiFi Rev 2**, **Arduino NANO 33 IoT**, **Arduino MKR WiFi 1010** and **Arduino MKR VIDOR 4000**. +Please update the WiFiNINA firmware: [WiFiNINA firmware update](WifiNinaFirmware.md). + Create *WifiProps* instance with MQTT parameters, then create *PropsData* instances and *PropsActions*. #### MQTT topics @@ -329,6 +331,8 @@ See [EXAMPLES.md](EXAMPLES.md) for an adaptation of the Blink example (https://w - Arduino Ethernet - Arduino Ethernet Shield +For WiFi props, please update the WiFiNINA firmware: [WiFiNINA firmware update](WifiNinaFirmware.md). + To use other WiFi hardware compatible with any *Nick O'Leary PubSubClient* library you have to fork `WifiProps.h` and `WifiProps.cpp` and to replace `WiFiNINA.h` whih appropriate WiFi library (`ESP8266WiFi.h` for example): - Arduino WiFi Shield - Sparkfun WiFly Shield – [library](https://github.com/dpslwk/WiFly) diff --git a/PrésentationEditor.snag b/PrésentationEditor.snag new file mode 100644 index 0000000..d212d92 Binary files /dev/null and b/PrésentationEditor.snag differ diff --git a/README.md b/README.md index 01e25c7..2affe6d 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Add `#include "ArduinoProps.h"` on top of your sketch and start coding. Reading | [PropsAction class reference](PropsAction.md) | | [ArduinoProps library examples](EXAMPLES.md) | | [Arduino Props for Escape Room 2.0](Arduino_Props.md) | +| [WiFiNINA firmware update](WifiNinaFirmware.md) | ## 2. Escape room 2.0 props with Arduino @@ -173,6 +174,9 @@ More MQTT topics can be use for anything (room scenario, etc.). - Arduino MKR VIDOR 4000 - Arduino Ethernet - Arduino Ethernet Shield + +For WiFi props, please update the WiFiNINA firmware: [WiFiNINA firmware update](WifiNinaFirmware.md). + To use other WiFi hardware compatible with any *Nick O'Leary PubSubClient* library you have to fork `WifiProps.h` and `WifiProps.cpp` and to replace `WiFiNINA.h` whih appropriate WiFi library (`ESP8266WiFi.h` for example): - Arduino WiFi Shield diff --git a/WifiNinaFirmware.md b/WifiNinaFirmware.md new file mode 100644 index 0000000..6c966e3 --- /dev/null +++ b/WifiNinaFirmware.md @@ -0,0 +1,58 @@ +# *WiFiNINA* firmware update + +Nowadays, fall 2019, we still receive *WiFiNINA* arduinos with firmware 1.0.0.0 version (Arduino Uno WiFi Rev 2, Arduino NANO 33 IoT, Arduino MKR WiFi 1010, Arduino MKR VIDOR 4000). + +***It is highly recommended to update *WiFiNINA* firmware to latest version.*** + +## Known issue with 1.0.0.0 version +`WiFi.config()` does not work, we can't set static IP address. + +That's a very good reason to update the firmware. + +## Update *WiFiNINA* firmware how-to +1. Upload *FirmwareUpdater* sketch +2. Open **WiFi101 / WiFiNINA Firmware Updater** +3. Test board connection +4. Update *WiFiNINA* firmware + + +### 1. Upload *FirmwareUpdater* sketch + +Load the *FirmwareUpdater* sketch from **File > Examples > WiFiNINA > Tools > FirmwareUpdater** +![](wifinina-firmware-1.png) + + +### 2. Open *WiFi101 / WiFiNINA Firmware Updater* + +Open the firmware updater from **Tools > WiFi101 / WiFiNINA Firmware Updater** +![](wifinina-firmware-2.png) + + +### 3. Test board connection + +Select the board port: + +![](wifinina-firmware-3.png) + + +And click **Test connection**: + +![](wifinina-firmware-4.png) + + +### 4. Update *WiFiNINA* firmware + +Select the latest firmware available and click **Update Firmware**: +![](wifinina-firmware-5.png) + +Update process will take about a minute then you're done: +![](wifinina-firmware-6.png) + + +## Author + +**Marie FAURE** (Nov 13th, 2019) +* company: FAURE SYSTEMS SAS +* mail: *dev at faure dot systems* +* github: fauresystems +* web: Live Escape Grenoble \ No newline at end of file diff --git a/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino b/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino index e295453..b60838a 100644 --- a/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino +++ b/examples/BlinkOnWifiProps/BlinkOnWifiProps.ino @@ -40,6 +40,8 @@ bool wifiBegun(false); void setup() { + Serial.begin(9600); + props.addData(&clignoter); props.addData(&led); @@ -54,14 +56,26 @@ void loop() { if (!wifiBegun) { WiFi.begin(ssid, passphrase); - // do static IP configuration disabling the dhcp client, must be called after every WiFi.begin() - //WiFi.config(IPAddress(192, 168, 1, 21), // local_ip - // IPAddress(192, 168, 1, 1), // dns_server - // IPAddress(192, 168, 1, 1), // gateway - // IPAddress(255, 255, 255, 0)); // subnet + Serial.println(WiFi.firmwareVersion()); delay(250); // acceptable freeze for this props (otherwise use PropsAction for async-like behavior) + // do static IP configuration disabling the dhcp client, must be called after every WiFi.begin() + String fv = WiFi.firmwareVersion(); + if (fv.startsWith("1.0")) { + Serial.println("Please upgrade the firmware for static IP"); + // see https://github.com/fauresystems/ArduinoProps/blob/master/WifiNinaFirmware.md + } + else { + //WiFi.config(IPAddress(192, 168, 1, 21), // local_ip + // IPAddress(192, 168, 1, 1), // dns_server + // IPAddress(192, 168, 1, 1), // gateway + // IPAddress(255, 255, 255, 0)); // subnet + //WiFi.setHostname("wifiprops"); + } if (WiFi.status() == WL_CONNECTED) { - wifiBegun = true; + wifiBegun = true; + Serial.println(WiFi.localIP()); + Serial.println(WiFi.subnetMask()); + Serial.println(WiFi.gatewayIP()); } else { WiFi.end(); } diff --git a/wifinina-firmware-1.png b/wifinina-firmware-1.png new file mode 100644 index 0000000..d9ed398 Binary files /dev/null and b/wifinina-firmware-1.png differ diff --git a/wifinina-firmware-2.png b/wifinina-firmware-2.png new file mode 100644 index 0000000..83d2fa6 Binary files /dev/null and b/wifinina-firmware-2.png differ diff --git a/wifinina-firmware-3.png b/wifinina-firmware-3.png new file mode 100644 index 0000000..22ec47f Binary files /dev/null and b/wifinina-firmware-3.png differ diff --git a/wifinina-firmware-4.png b/wifinina-firmware-4.png new file mode 100644 index 0000000..e9e0c5e Binary files /dev/null and b/wifinina-firmware-4.png differ diff --git a/wifinina-firmware-5.png b/wifinina-firmware-5.png new file mode 100644 index 0000000..bf91f26 Binary files /dev/null and b/wifinina-firmware-5.png differ diff --git a/wifinina-firmware-6.png b/wifinina-firmware-6.png new file mode 100644 index 0000000..16fda33 Binary files /dev/null and b/wifinina-firmware-6.png differ