Skip to content

Commit f5fecc7

Browse files
author
fpr
committed
Modify examples for the STM32Ethernet library
Signed-off-by: fpr <[email protected]>
1 parent 79d3d62 commit f5fecc7

File tree

11 files changed

+54
-65
lines changed

11 files changed

+54
-65
lines changed

examples/AdvancedChatServer/AdvancedChatServer.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@
55
to all connected clients but the client the message comes from.
66
To use, telnet to your device's IP address and type.
77
You can see the client's input in the serial monitor as well.
8-
Using an Arduino Wiznet Ethernet shield.
98
109
Circuit:
11-
* Ethernet shield attached to pins 10, 11, 12, 13
10+
* STM32 board with Ethernet support
1211
1312
created 18 Dec 2009
1413
by David A. Mellis
1514
modified 9 Apr 2012
1615
by Tom Igoe
1716
redesigned to make use of operator== 25 Nov 2013
1817
by Norbert Truchsess
18+
modified 23 Jun 2017
19+
by Wi6Labs
1920
2021
*/
2122

22-
#include <SPI.h>
23-
#include <Ethernet.h>
23+
#include <LwIP.h>
24+
#include <STM32Ethernet.h>
2425

2526
// Enter a MAC address and IP address for your controller below.
2627
// The IP address will be dependent on your local network.

examples/BarometricPressureWebServer/BarometricPressureWebServer.ino

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@
1818
1919
created 31 July 2010
2020
by Tom Igoe
21+
modified 23 Jun 2017
22+
by Wi6Labs
2123
*/
2224

23-
#include <Ethernet.h>
25+
#include <LwIP.h>
26+
#include <STM32Ethernet.h>
2427
// the sensor communicates using SPI, so include the library:
2528
#include <SPI.h>
2629

examples/ChatServer/ChatServer.ino

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
A simple server that distributes any incoming messages to all
55
connected clients. To use, telnet to your device's IP address and type.
66
You can see the client's input in the serial monitor as well.
7-
Using an Arduino Wiznet Ethernet shield.
87
98
Circuit:
10-
* Ethernet shield attached to pins 10, 11, 12, 13
9+
* STM32 board with Ethernet support
1110
1211
created 18 Dec 2009
1312
by David A. Mellis
1413
modified 9 Apr 2012
1514
by Tom Igoe
16-
15+
modified 23 Jun 2017
16+
by Wi6Labs
1717
*/
1818

19-
#include <SPI.h>
20-
#include <Ethernet.h>
19+
#include <LwIP.h>
20+
#include <STM32Ethernet.h>
2121

2222
// Enter a MAC address and IP address for your controller below.
2323
// The IP address will be dependent on your local network.
@@ -75,6 +75,3 @@ void loop() {
7575
}
7676
}
7777
}
78-
79-
80-

examples/DhcpAddressPrinter/DhcpAddressPrinter.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
44
This sketch uses the DHCP extensions to the Ethernet library
55
to get an IP address via DHCP and print the address obtained.
6-
using an Arduino Wiznet Ethernet shield.
76
87
Circuit:
9-
Ethernet shield attached to pins 10, 11, 12, 13
8+
STM32 board with Ethernet support
109
1110
created 12 April 2011
1211
modified 9 Apr 2012
1312
by Tom Igoe
1413
modified 02 Sept 2015
1514
by Arturo Guadalupi
16-
15+
modified 23 Jun 2017
16+
by Wi6Labs
1717
*/
1818

19-
#include <SPI.h>
20-
#include <Ethernet.h>
19+
#include <LwIP.h>
20+
#include <STM32Ethernet.h>
2121

2222
// Enter a MAC address for your controller below.
2323
// Newer Ethernet shields have a MAC address printed on a sticker on the shield

examples/DhcpChatServer/DhcpChatServer.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,25 @@
44
A simple server that distributes any incoming messages to all
55
connected clients. To use, telnet to your device's IP address and type.
66
You can see the client's input in the serial monitor as well.
7-
Using an Arduino Wiznet Ethernet shield.
87
98
THis version attempts to get an IP address using DHCP
109
1110
Circuit:
12-
* Ethernet shield attached to pins 10, 11, 12, 13
11+
* STM32 board with Ethernet support
1312
1413
created 21 May 2011
1514
modified 9 Apr 2012
1615
by Tom Igoe
1716
modified 02 Sept 2015
1817
by Arturo Guadalupi
1918
Based on ChatServer example by David A. Mellis
19+
modified 23 Jun 2017
20+
by Wi6Labs
2021
2122
*/
2223

23-
#include <SPI.h>
24-
#include <Ethernet.h>
24+
#include <LwIP.h>
25+
#include <STM32Ethernet.h>
2526

2627
// Enter a MAC address and IP address for your controller below.
2728
// The IP address will be dependent on your local network.
@@ -89,4 +90,3 @@ void loop() {
8990
Ethernet.maintain();
9091
}
9192
}
92-

examples/TelnetClient/TelnetClient.ino

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,18 @@
1010
http://processing.org/
1111
1212
Circuit:
13-
* Ethernet shield attached to pins 10, 11, 12, 13
13+
* STM32 board with Ethernet support
1414
1515
created 14 Sep 2010
1616
modified 9 Apr 2012
1717
by Tom Igoe
18+
modified 23 Jun 2017
19+
by Wi6Labs
1820
1921
*/
2022

21-
#include <SPI.h>
22-
#include <Ethernet.h>
23+
#include <LwIP.h>
24+
#include <STM32Ethernet.h>
2325

2426
// Enter a MAC address and IP address for your controller below.
2527
// The IP address will be dependent on your local network:
@@ -86,7 +88,3 @@ void loop() {
8688
while (true);
8789
}
8890
}
89-
90-
91-
92-

examples/UDPSendReceiveString/UDPSendReceiveString.ino

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
99
created 21 Aug 2010
1010
by Michael Margolis
11+
modified 23 Jun 2017
12+
by Wi6Labs
1113
1214
This code is in the public domain.
1315
*/
1416

15-
16-
#include <SPI.h> // needed for Arduino versions later than 0018
17-
#include <Ethernet.h>
17+
#include <LwIP.h>
18+
#include <STM32Ethernet.h>
1819
#include <EthernetUdp.h> // UDP library from: [email protected] 12/30/2008
1920

2021

@@ -112,5 +113,3 @@ void loop() {
112113
println();
113114
}
114115
*/
115-
116-

examples/UdpNtpClient/UdpNtpClient.ino

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313
by Tom Igoe
1414
modified 02 Sept 2015
1515
by Arturo Guadalupi
16+
modified 23 Jun 2017
17+
by Wi6Labs
1618
1719
This code is in the public domain.
1820
1921
*/
2022

21-
#include <SPI.h>
22-
#include <Ethernet.h>
23+
#include <LwIP.h>
24+
#include <STM32Ethernet.h>
2325
#include <EthernetUdp.h>
2426

2527
// Enter a MAC address for your controller below.
@@ -130,13 +132,3 @@ void sendNTPpacket(char* address) {
130132
Udp.write(packetBuffer, NTP_PACKET_SIZE);
131133
Udp.endPacket();
132134
}
133-
134-
135-
136-
137-
138-
139-
140-
141-
142-

examples/WebClient/WebClient.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22
Web client
33
44
This sketch connects to a website (http://www.google.com)
5-
using an Arduino Wiznet Ethernet shield.
65
76
Circuit:
8-
* Ethernet shield attached to pins 10, 11, 12, 13
7+
* STM32 board with Ethernet support
98
109
created 18 Dec 2009
1110
by David A. Mellis
1211
modified 9 Apr 2012
1312
by Tom Igoe, based on work by Adrian McEwen
13+
modified 23 Jun 2017
14+
by Wi6Labs
1415
1516
*/
16-
17-
#include <SPI.h>
18-
#include <Ethernet.h>
17+
18+
#include <LwIP.h>
19+
#include <STM32Ethernet.h>
1920

2021
// Enter a MAC address for your controller below.
2122
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
@@ -82,4 +83,3 @@ void loop() {
8283
while (true);
8384
}
8485
}
85-

examples/WebClientRepeating/WebClientRepeating.ino

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
/*
22
Repeating Web client
33
4-
This sketch connects to a a web server and makes a request
5-
using a Wiznet Ethernet shield. You can use the Arduino Ethernet shield, or
6-
the Adafruit Ethernet shield, either one will work, as long as it's got
7-
a Wiznet Ethernet module on board.
4+
This sketch connects to a a web server and makes a request.
85
96
This example uses DNS, by assigning the Ethernet client with a MAC address,
107
IP address, and DNS address.
118
129
Circuit:
13-
* Ethernet shield attached to pins 10, 11, 12, 13
10+
* STM32 board with Ethernet support
1411
1512
created 19 Apr 2012
1613
by Tom Igoe
1714
modified 21 Jan 2014
1815
by Federico Vanzati
16+
modified 23 Jun 2017
17+
by Wi6Labs
1918
2019
http://www.arduino.cc/en/Tutorial/WebClientRepeating
2120
This code is in the public domain.
2221
2322
*/
2423

25-
#include <SPI.h>
26-
#include <Ethernet.h>
24+
#include <LwIP.h>
25+
#include <STM32Ethernet.h>
2726

2827
// assign a MAC address for the ethernet controller.
2928
// fill in your address here:

0 commit comments

Comments
 (0)