Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit d628009

Browse files
authored
v1.8.15-1 to use new WiFi101_Generic
### Releases v1.8.15-1 1. Using new [WiFi101_Generic](https://github.com/khoih-prog/WiFi101_Generic) library to permit sending larger data than total 4K when using `MKR1000` or `MKRWiFi1010` with `ATMEL WINC1500 WiFi` 2. Modify examples for new features
1 parent 84f9f77 commit d628009

File tree

40 files changed

+290
-66
lines changed

40 files changed

+290
-66
lines changed

examples/AP_SimpleWebServer/AP_SimpleWebServer.ino

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@
5050
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"
5151

5252
#include <SPI.h>
53-
#include <WiFiNINA_Generic.h>
53+
54+
#if USING_WIFI101
55+
#include <WiFi101_Generic.h>
56+
#else
57+
#include <WiFiNINA_Generic.h>
58+
#endif
5459

5560
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
5661
char ssid[] = SECRET_SSID; // your network SSID (name)
@@ -66,19 +71,24 @@ WiFiServer server(80);
6671

6772
void setup()
6873
{
74+
pinMode(led, OUTPUT); // set the LED pin mode
75+
6976
//Initialize serial and wait for port to open:
7077
Serial.begin(115200);
7178

7279
while (!Serial && millis() < 5000);
7380

7481
Serial.print(F("\nStart AP_SimpleWebServer on "));
75-
Serial.println(BOARD_NAME);
76-
Serial.println(WIFININA_GENERIC_VERSION);
77-
78-
pinMode(led, OUTPUT); // set the LED pin mode
82+
Serial.println(BOARD_NAME);
7983

8084
// check for the WiFi module:
85+
#if USING_WIFI101
86+
if (WiFi.status() == WL_NO_SHIELD)
87+
#else
88+
Serial.println(WIFININA_GENERIC_VERSION);
89+
8190
if (WiFi.status() == WL_NO_MODULE)
91+
#endif
8292
{
8393
Serial.println(F("Communication with WiFi module failed!"));
8494

examples/AP_SimpleWebServer/defines.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@
4949
#define BOARD_TYPE "SAMD Zero"
5050
#elif defined(ARDUINO_SAMD_MKR1000)
5151
#define BOARD_TYPE "SAMD MKR1000"
52+
#define USING_WIFI101 true
5253
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
5354
#define BOARD_TYPE "SAMD MKRWIFI1010"
55+
#define USING_WIFI101 true
5456
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
5557
#define BOARD_TYPE "SAMD NANO_33_IOT"
5658
#elif defined(ARDUINO_SAMD_MKRFox1200)

examples/ConnectNoEncryption/ConnectNoEncryption.ino

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@
4343
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"
4444

4545
#include <SPI.h>
46-
#include <WiFiNINA_Generic.h>
46+
47+
#if USING_WIFI101
48+
#include <WiFi101_Generic.h>
49+
#else
50+
#include <WiFiNINA_Generic.h>
51+
#endif
4752

4853
char ssid[] = SECRET_SSID; // your network SSID (name)
4954

@@ -58,10 +63,15 @@ void setup()
5863

5964
Serial.print(F("\nStart ConnectNoEncryption on "));
6065
Serial.println(BOARD_NAME);
61-
Serial.println(WIFININA_GENERIC_VERSION);
62-
66+
6367
// check for the WiFi module:
68+
#if USING_WIFI101
69+
if (WiFi.status() == WL_NO_SHIELD)
70+
#else
71+
Serial.println(WIFININA_GENERIC_VERSION);
72+
6473
if (WiFi.status() == WL_NO_MODULE)
74+
#endif
6575
{
6676
Serial.println(F("Communication with WiFi module failed!"));
6777

examples/ConnectNoEncryption/defines.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@
4949
#define BOARD_TYPE "SAMD Zero"
5050
#elif defined(ARDUINO_SAMD_MKR1000)
5151
#define BOARD_TYPE "SAMD MKR1000"
52+
#define USING_WIFI101 true
5253
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
5354
#define BOARD_TYPE "SAMD MKRWIFI1010"
55+
#define USING_WIFI101 true
5456
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
5557
#define BOARD_TYPE "SAMD NANO_33_IOT"
5658
#elif defined(ARDUINO_SAMD_MKRFox1200)

examples/ConnectWithWEP/ConnectWithWEP.ino

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@
5252
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"
5353

5454
#include <SPI.h>
55-
#include <WiFiNINA_Generic.h>
55+
56+
#if USING_WIFI101
57+
#include <WiFi101_Generic.h>
58+
#else
59+
#include <WiFiNINA_Generic.h>
60+
#endif
5661

5762
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
5863
char ssid[] = SECRET_SSID; // your network SSID (name)
@@ -71,10 +76,15 @@ void setup()
7176

7277
Serial.print(F("\nStart ConnectWithWEP on "));
7378
Serial.println(BOARD_NAME);
74-
Serial.println(WIFININA_GENERIC_VERSION);
7579

7680
// check for the WiFi module:
81+
#if USING_WIFI101
82+
if (WiFi.status() == WL_NO_SHIELD)
83+
#else
84+
Serial.println(WIFININA_GENERIC_VERSION);
85+
7786
if (WiFi.status() == WL_NO_MODULE)
87+
#endif
7888
{
7989
Serial.println(F("Communication with WiFi module failed!"));
8090

examples/ConnectWithWEP/defines.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@
4949
#define BOARD_TYPE "SAMD Zero"
5050
#elif defined(ARDUINO_SAMD_MKR1000)
5151
#define BOARD_TYPE "SAMD MKR1000"
52+
#define USING_WIFI101 true
5253
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
5354
#define BOARD_TYPE "SAMD MKRWIFI1010"
55+
#define USING_WIFI101 true
5456
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
5557
#define BOARD_TYPE "SAMD NANO_33_IOT"
5658
#elif defined(ARDUINO_SAMD_MKRFox1200)

examples/ConnectWithWPA/ConnectWithWPA.ino

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@
4141
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"
4242

4343
#include <SPI.h>
44-
#include <WiFiNINA_Generic.h>
44+
45+
#if USING_WIFI101
46+
#include <WiFi101_Generic.h>
47+
#else
48+
#include <WiFiNINA_Generic.h>
49+
#endif
4550

4651
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
4752
char ssid[] = SECRET_SSID; // your network SSID (name)
@@ -58,10 +63,15 @@ void setup()
5863

5964
Serial.print(F("\nStart ConnectWithWPA on "));
6065
Serial.println(BOARD_NAME);
61-
Serial.println(WIFININA_GENERIC_VERSION);
62-
66+
6367
// check for the WiFi module:
68+
#if USING_WIFI101
69+
if (WiFi.status() == WL_NO_SHIELD)
70+
#else
71+
Serial.println(WIFININA_GENERIC_VERSION);
72+
6473
if (WiFi.status() == WL_NO_MODULE)
74+
#endif
6575
{
6676
Serial.println(F("Communication with WiFi module failed!"));
6777

examples/ConnectWithWPA/defines.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@
4949
#define BOARD_TYPE "SAMD Zero"
5050
#elif defined(ARDUINO_SAMD_MKR1000)
5151
#define BOARD_TYPE "SAMD MKR1000"
52+
#define USING_WIFI101 true
5253
#elif defined(ARDUINO_SAMD_MKRWIFI1010)
5354
#define BOARD_TYPE "SAMD MKRWIFI1010"
55+
#define USING_WIFI101 true
5456
#elif defined(ARDUINO_SAMD_NANO_33_IOT)
5557
#define BOARD_TYPE "SAMD NANO_33_IOT"
5658
#elif defined(ARDUINO_SAMD_MKRFox1200)

examples/ConnectWithWPA2Enterprise/ConnectWithWPA2Enterprise.ino

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ void setup()
5757
Serial.print(F("\nStart ConnectWithWPA2Enterprise on "));
5858
Serial.println(BOARD_NAME);
5959
Serial.println(WIFININA_GENERIC_VERSION);
60-
61-
// check for the WiFi module:
60+
6261
if (WiFi.status() == WL_NO_MODULE)
6362
{
6463
Serial.println(F("Communication with WiFi module failed!"));

examples/MultiServers/MultiServers.ino

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@
3434
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.8"
3535

3636
#include "defines.h"
37-
#include <WiFiNINA_Generic.h>
37+
38+
#include <SPI.h>
39+
40+
#if USING_WIFI101
41+
#include <WiFi101_Generic.h>
42+
#else
43+
#include <WiFiNINA_Generic.h>
44+
#endif
3845

3946
// https://github.com/ocrdu/NINA-Websocket
4047
#include <WebSocketServer.h>
@@ -119,10 +126,14 @@ void setup()
119126
Serial.print(F("\nStart MultiServers on "));
120127
Serial.println(BOARD_TYPE);
121128

129+
// check for the WiFi module:
130+
#if USING_WIFI101
131+
if (WiFi.status() == WL_NO_SHIELD)
132+
#else
122133
Serial.println(WIFININA_GENERIC_VERSION);
123-
124-
// check for the WiFi module:
134+
125135
if (WiFi.status() == WL_NO_MODULE)
136+
#endif
126137
{
127138
Serial.println(F("Communication with WiFi module failed!"));
128139

0 commit comments

Comments
 (0)