Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

STM32Ethernet source files #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from Aug 16, 2017
Prev Previous commit
Next Next commit
Modify examples for the STM32Ethernet library
Signed-off-by: fpr <fabien.perroquin@wi6labs.com>
  • Loading branch information
fpr committed Jul 6, 2017
commit f5fecc7abaf86cd693ebff768f670d6b5996fc80
9 changes: 5 additions & 4 deletions 9 examples/AdvancedChatServer/AdvancedChatServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@
to all connected clients but the client the message comes from.
To use, telnet to your device's IP address and type.
You can see the client's input in the serial monitor as well.
Using an Arduino Wiznet Ethernet shield.

Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* STM32 board with Ethernet support

created 18 Dec 2009
by David A. Mellis
modified 9 Apr 2012
by Tom Igoe
redesigned to make use of operator== 25 Nov 2013
by Norbert Truchsess
modified 23 Jun 2017
by Wi6Labs

Copy link
Member

@fpistm fpistm Jul 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add dependency with LWIP lib from stm32duino (far all example)

*/

#include <SPI.h>
#include <Ethernet.h>
#include <LwIP.h>
#include <STM32Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@

created 31 July 2010
by Tom Igoe
modified 23 Jun 2017
by Wi6Labs
*/

#include <Ethernet.h>
#include <LwIP.h>
#include <STM32Ethernet.h>
// the sensor communicates using SPI, so include the library:
#include <SPI.h>

Expand Down
13 changes: 5 additions & 8 deletions 13 examples/ChatServer/ChatServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
A simple server that distributes any incoming messages to all
connected clients. To use, telnet to your device's IP address and type.
You can see the client's input in the serial monitor as well.
Using an Arduino Wiznet Ethernet shield.

Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* STM32 board with Ethernet support

created 18 Dec 2009
by David A. Mellis
modified 9 Apr 2012
by Tom Igoe

modified 23 Jun 2017
by Wi6Labs
*/

#include <SPI.h>
#include <Ethernet.h>
#include <LwIP.h>
#include <STM32Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network.
Expand Down Expand Up @@ -75,6 +75,3 @@ void loop() {
}
}
}



10 changes: 5 additions & 5 deletions 10 examples/DhcpAddressPrinter/DhcpAddressPrinter.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@

This sketch uses the DHCP extensions to the Ethernet library
to get an IP address via DHCP and print the address obtained.
using an Arduino Wiznet Ethernet shield.

Circuit:
Ethernet shield attached to pins 10, 11, 12, 13
STM32 board with Ethernet support

created 12 April 2011
modified 9 Apr 2012
by Tom Igoe
modified 02 Sept 2015
by Arturo Guadalupi

modified 23 Jun 2017
by Wi6Labs
*/

#include <SPI.h>
#include <Ethernet.h>
#include <LwIP.h>
#include <STM32Ethernet.h>

// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this line

Expand Down
10 changes: 5 additions & 5 deletions 10 examples/DhcpChatServer/DhcpChatServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,25 @@
A simple server that distributes any incoming messages to all
connected clients. To use, telnet to your device's IP address and type.
You can see the client's input in the serial monitor as well.
Using an Arduino Wiznet Ethernet shield.

THis version attempts to get an IP address using DHCP

Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* STM32 board with Ethernet support

created 21 May 2011
modified 9 Apr 2012
by Tom Igoe
modified 02 Sept 2015
by Arturo Guadalupi
Based on ChatServer example by David A. Mellis
modified 23 Jun 2017
by Wi6Labs

*/

#include <SPI.h>
#include <Ethernet.h>
#include <LwIP.h>
#include <STM32Ethernet.h>

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

12 changes: 5 additions & 7 deletions 12 examples/TelnetClient/TelnetClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@
http://processing.org/

Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* STM32 board with Ethernet support

created 14 Sep 2010
modified 9 Apr 2012
by Tom Igoe
modified 23 Jun 2017
by Wi6Labs

*/

#include <SPI.h>
#include <Ethernet.h>
#include <LwIP.h>
#include <STM32Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
Expand Down Expand Up @@ -86,7 +88,3 @@ void loop() {
while (true);
}
}




9 changes: 4 additions & 5 deletions 9 examples/UDPSendReceiveString/UDPSendReceiveString.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@

created 21 Aug 2010
by Michael Margolis
modified 23 Jun 2017
by Wi6Labs

This code is in the public domain.
*/


#include <SPI.h> // needed for Arduino versions later than 0018
#include <Ethernet.h>
#include <LwIP.h>
#include <STM32Ethernet.h>
#include <EthernetUdp.h> // UDP library from: bjoern@cs.stanford.edu 12/30/2008


Expand Down Expand Up @@ -112,5 +113,3 @@ void loop() {
println();
}
*/


16 changes: 4 additions & 12 deletions 16 examples/UdpNtpClient/UdpNtpClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
by Tom Igoe
modified 02 Sept 2015
by Arturo Guadalupi
modified 23 Jun 2017
by Wi6Labs

This code is in the public domain.

*/

#include <SPI.h>
#include <Ethernet.h>
#include <LwIP.h>
#include <STM32Ethernet.h>
#include <EthernetUdp.h>

// Enter a MAC address for your controller below.
Expand Down Expand Up @@ -130,13 +132,3 @@ void sendNTPpacket(char* address) {
Udp.write(packetBuffer, NTP_PACKET_SIZE);
Udp.endPacket();
}










12 changes: 6 additions & 6 deletions 12 examples/WebClient/WebClient.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,21 @@
Web client

This sketch connects to a website (http://www.google.com)
using an Arduino Wiznet Ethernet shield.

Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* STM32 board with Ethernet support

created 18 Dec 2009
by David A. Mellis
modified 9 Apr 2012
by Tom Igoe, based on work by Adrian McEwen
modified 23 Jun 2017
by Wi6Labs

*/

#include <SPI.h>
#include <Ethernet.h>
#include <LwIP.h>
#include <STM32Ethernet.h>

// Enter a MAC address for your controller below.
// Newer Ethernet shields have a MAC address printed on a sticker on the shield
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this line

Expand Down Expand Up @@ -82,4 +83,3 @@ void loop() {
while (true);
}
}

13 changes: 6 additions & 7 deletions 13 examples/WebClientRepeating/WebClientRepeating.ino
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
/*
Repeating Web client

This sketch connects to a a web server and makes a request
using a Wiznet Ethernet shield. You can use the Arduino Ethernet shield, or
the Adafruit Ethernet shield, either one will work, as long as it's got
a Wiznet Ethernet module on board.
This sketch connects to a a web server and makes a request.

This example uses DNS, by assigning the Ethernet client with a MAC address,
IP address, and DNS address.

Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* STM32 board with Ethernet support

created 19 Apr 2012
by Tom Igoe
modified 21 Jan 2014
by Federico Vanzati
modified 23 Jun 2017
by Wi6Labs

http://www.arduino.cc/en/Tutorial/WebClientRepeating
This code is in the public domain.

*/

#include <SPI.h>
#include <Ethernet.h>
#include <LwIP.h>
#include <STM32Ethernet.h>

// assign a MAC address for the ethernet controller.
// fill in your address here:
Expand Down
10 changes: 5 additions & 5 deletions 10 examples/WebServer/WebServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
Web Server

A simple web server that shows the value of the analog input pins.
using an Arduino Wiznet Ethernet shield.

Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
* STM32 board with Ethernet support
* Analog inputs attached to pins A0 through A5 (optional)

created 18 Dec 2009
Expand All @@ -14,11 +13,13 @@
by Tom Igoe
modified 02 Sept 2015
by Arturo Guadalupi
modified 23 Jun 2017
by Wi6Labs

*/

#include <SPI.h>
#include <Ethernet.h>
#include <LwIP.h>
#include <STM32Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
Expand Down Expand Up @@ -99,4 +100,3 @@ void loop() {
Serial.println("client disconnected");
}
}

Morty Proxy This is a proxified and sanitized view of the page, visit original site.