Skip to content
This repository was archived by the owner on Dec 20, 2018. It is now read-only.

Commit 362908b

Browse files
committed
pin tweaks
1 parent 557cf96 commit 362908b

File tree

2 files changed

+41
-21
lines changed

2 files changed

+41
-21
lines changed

examples/CheckWifi101FirmwareVersion/CheckWifi101FirmwareVersion.ino

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,15 @@
99
* This code is in the public domain.
1010
*/
1111
#include <SPI.h>
12-
#include <WiFi101.h>
12+
#include <Adafruit_WINC1500.h>
13+
14+
/************************* WiFI Setup *****************************/
15+
#define WINC_CS 8
16+
#define WINC_IRQ 7
17+
#define WINC_RST 4
18+
#define WINC_EN 2 // or, tie EN to VCC
19+
20+
Adafruit_WINC1500 WiFi(WINC_CS, WINC_IRQ, WINC_RST);
1321

1422
void setup() {
1523
// Initialize serial
@@ -19,11 +27,11 @@ void setup() {
1927
}
2028

2129
// Print a welcome message
22-
Serial.println("WiFi101 firmware check.");
30+
Serial.println("WINC1500 firmware check.");
2331
Serial.println();
2432

2533
// Check for the presence of the shield
26-
Serial.print("WiFi101 shield: ");
34+
Serial.print("WINC1500: ");
2735
if (WiFi.status() == WL_NO_SHIELD) {
2836
Serial.println("NOT PRESENT");
2937
return; // don't continue
@@ -45,13 +53,12 @@ void setup() {
4553
Serial.println("Check result: PASSED");
4654
} else {
4755
Serial.println("Check result: NOT PASSED");
48-
Serial.println(" - The firmware version on the shield do not match the");
56+
Serial.println(" - The firmware version on the WINC1500 do not match the");
4957
Serial.println(" version required by the library, you may experience");
5058
Serial.println(" issues or failures.");
5159
}
5260
}
5361

5462
void loop() {
5563
// do nothing
56-
}
57-
64+
}

examples/WiFiWebClient/WiFiWebClient.ino

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,45 @@
2121

2222

2323
#include <SPI.h>
24-
#include <WiFi101.h>
24+
#include <Adafruit_WINC1500.h>
2525

26-
char ssid[] = "yourNetwork"; // your network SSID (name)
27-
char pass[] = "secretPassword"; // your network password (use for WPA, or use as key for WEP)
28-
int keyIndex = 0; // your network key Index number (needed only for WEP)
26+
#define WINC_CS 8
27+
#define WINC_IRQ 7
28+
#define WINC_RST 4
29+
30+
Adafruit_WINC1500 WiFi(WINC_CS, WINC_IRQ, WINC_RST);
31+
32+
// Default Hardware SPI (SCK/MOSI/MISO), SS -> #10, INT -> #7, RST -> #5, EN -> 3-5V
33+
//Adafruit_WINC1500 WiFi;
34+
35+
36+
char ssid[] = "yournetwork"; // your network SSID (name)
37+
char pass[] = "yourpassword"; // your network password (use for WPA, or use as key for WEP)
38+
int keyIndex = 0; // your network key Index number (needed only for WEP)
2939

3040
int status = WL_IDLE_STATUS;
3141
// if you don't want to use DNS (and reduce your sketch size)
3242
// use the numeric IP instead of the name for the server:
33-
//IPAddress server(74,125,232,128); // numeric IP for Google (no DNS)
34-
char server[] = "www.google.com"; // name address for Google (using DNS)
43+
//IPAddress server(141,101,112,175); // numeric IP for Google (no DNS)
44+
char server[] = "www.adafruit.com"; // name address for Google (using DNS)
45+
#define webpage "/testwifi/index.html"
46+
3547

3648
// Initialize the Ethernet client library
3749
// with the IP address and port of the server
3850
// that you want to connect to (port 80 is default for HTTP):
39-
WiFiClient client;
51+
Adafruit_WINC1500Client client;
4052

4153
void setup() {
42-
//Initialize serial and wait for port to open:
43-
Serial.begin(9600);
4454
while (!Serial) {
4555
; // wait for serial port to connect. Needed for native USB port only
4656
}
4757

58+
//Initialize serial and wait for port to open:
59+
Serial.begin(9600);
60+
61+
Serial.println("WINC1500 Web client test");
62+
4863
// check for the presence of the shield:
4964
if (WiFi.status() == WL_NO_SHIELD) {
5065
Serial.println("WiFi shield not present");
@@ -70,8 +85,10 @@ void setup() {
7085
if (client.connect(server, 80)) {
7186
Serial.println("connected to server");
7287
// Make a HTTP request:
73-
client.println("GET /search?q=arduino HTTP/1.1");
74-
client.println("Host: www.google.com");
88+
client.print("GET ");
89+
client.print(webpage);
90+
client.println(" HTTP/1.1");
91+
client.print("Host: "); client.println(server);
7592
client.println("Connection: close");
7693
client.println();
7794
}
@@ -114,7 +131,3 @@ void printWifiStatus() {
114131
Serial.println(" dBm");
115132
}
116133

117-
118-
119-
120-

0 commit comments

Comments
 (0)