ethernet

Dependencies:   EthernetInterface mbed-rtos mbed

Fork of TCPSocket_HelloWorld by mbed official

Files at this revision

API Documentation at this revision

Comitter:
MohamadNazrin
Date:
Wed Feb 21 07:34:51 2018 +0000
Parent:
15:bc7fc13dc5f6
Commit message:
lcd

Changed in this revision

C12832_lcd.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r bc7fc13dc5f6 -r 65255e25e5dc C12832_lcd.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832_lcd.lib	Wed Feb 21 07:34:51 2018 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/dreschpe/code/C12832_lcd/#8f86576007d6
diff -r bc7fc13dc5f6 -r 65255e25e5dc main.cpp
--- 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) {}
 }