Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: UIPEthernet_GSOE
Diff: main.cpp
- Revision:
- 12:7c46dcf6f7e2
- Parent:
- 11:6c0b20227ca2
- Child:
- 14:810ac368dd6e
--- a/main.cpp Tue Aug 27 22:10:13 2019 +0000
+++ b/main.cpp Fri Aug 30 08:23:46 2019 +0000
@@ -8,18 +8,14 @@
//#define DEBUG
-// To be used when a static IP is needed
#define IP "192.168.1.35"
#define GATEWAY "192.168.1.1"
#define NETMASK "255.255.255.0"
#define PORT 80
-// The ENC28J60 chip doesn't have a built-in MAC address.
-// It's up to us to provide one which is unique within the connected network.
-// So modify the one below accordingly.
const uint8_t MAC[6] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x06 };
UipEthernet net(MAC, D11, D12, D13, D10); // mosi, miso, sck, cs
-TcpServer server;
+TcpServer server; // Ethernet server
TcpClient* client;
char receiveBuf[1024];
const int OFF = 0;
@@ -220,7 +216,7 @@
printf("Starting ...\r\n");
// IP address must be unique and compatible with your network.
- //net->set_network(IP, NETMASK, GATEWAY); // include this for using static IP address
+ //net.set_network(IP, NETMASK, GATEWAY); // include this for using static IP address
net.connect();
// Show the network address