Skip to content

Commit 6f6051f

Browse files
committed
WiFi: move library to a dedicated folder
1 parent e0773de commit 6f6051f

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

libraries/SocketWrapper/examples/WiFiWebClient/WiFiWebClient.ino renamed to libraries/WiFi/examples/WiFiWebClient/WiFiWebClient.ino

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,31 @@
1717

1818
#include "arduino_secrets.h"
1919
///////please enter your sensitive data in the Secret tab/arduino_secrets.h
20-
char ssid[] = SECRET_SSID; // your network SSID (name)
21-
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
22-
int keyIndex = 0; // your network key Index number (needed only for WEP)
20+
char ssid[] = SECRET_SSID; // your network SSID (name)
21+
char pass[] = SECRET_PASS; // your network password (use for WPA, or use as key for WEP)
22+
int keyIndex = 0; // your network key Index number (needed only for WEP)
2323

2424
int status = WL_IDLE_STATUS;
2525
// if you don't want to use DNS (and reduce your sketch size)
2626
// use the numeric IP instead of the name for the server:
2727
// IPAddress server(93,184,216,34); // IP address for example.com (no DNS)
28-
char server[] = "example.com"; // host name for example.com (using DNS)
28+
char server[] = "example.com"; // host name for example.com (using DNS)
2929

3030
ZephyrClient client;
3131

3232
void setup() {
3333
//Initialize serial and wait for port to open:
3434
Serial.begin(9600);
3535
while (!Serial) {
36-
; // wait for serial port to connect. Needed for native USB port only
36+
; // wait for serial port to connect. Needed for native USB port only
3737
}
3838

3939
// check for the WiFi module:
4040
if (WiFi.status() == WL_NO_SHIELD) {
4141
Serial.println("Communication with WiFi module failed!");
4242
// don't continue
43-
while (true);
43+
while (true)
44+
;
4445
}
4546

4647
// attempt to connect to Wifi network:
@@ -49,7 +50,6 @@ void setup() {
4950
Serial.println(ssid);
5051
// Connect to WPA/WPA2 network. Change this line if using open or WEP network:
5152
status = WiFi.begin(ssid, pass);
52-
Serial.println(status);
5353
// wait 3 seconds for connection:
5454
delay(3000);
5555
}
@@ -84,7 +84,8 @@ void loop() {
8484
client.stop();
8585

8686
// do nothing forevermore:
87-
while (true);
87+
while (true)
88+
;
8889
}
8990
}
9091

libraries/WiFi/library.properties

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name=WiFi
2+
version=0.1.0
3+
author=Arduino
4+
maintainer=Arduino <info@arduino.cc>
5+
sentence=Enables WiFi connection
6+
paragraph=With this library you can use the WiFi to connect to Internet.
7+
category=Communication
8+
url=https://github.com/arduino/ArduinoCore-zephyr/tree/master/libraries/WiFi
9+
architectures=zephyr_main,zephyr_contrib
10+
includes=WiFi.h
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)