ethernet

Dependencies:   EthernetInterface mbed-rtos mbed

Fork of TCPSocket_HelloWorld by mbed official

Revision:
16:65255e25e5dc
Parent:
15:bc7fc13dc5f6
--- a/main.cpp	Fri Feb 09 02:19:29 2018 +0000
+++ b/main.cpp	Wed Feb 21 07:34:51 2018 +0000
@@ -1,5 +1,9 @@
 #include "mbed.h"
 #include "EthernetInterface.h"
+#include "C12832_lcd.h" // Include for LCD code
+
+C12832_LCD lcd; //Initialize LCD Screen
+
 int main() {
     
 static const char*          mbedIp       = "192.168.137.2";  //IP
@@ -10,7 +14,8 @@
  //   eth.init(); //Use DHCP
  eth.init(mbedIp,mbedMask,mbedGateway); 
     eth.connect();
-    printf("IP Address is %s\n", eth.getIPAddress());
+    printf("IP Address is %s\n", eth.getIPAddress()); // display at terminal
+    lcd.printf("IP address: %s \n",eth.getIPAddress()); // display LCD screen
 
     while(1) {}
 }