STS2 MBED lycee victor hugo Besancon
Dependencies: EthernetInterface mbed-rtos mbed
main.cpp
00001 #include "mbed.h" 00002 #include "EthernetInterface.h" 00003 static const char* mbedIp = "192.168.1.102"; //IP 00004 static const char* mbedMask = "255.255.255.0"; // Mask 00005 static const char* mbedGateway = "192.168.1.1"; //Gateway 00006 00007 00008 00009 int main() { 00010 EthernetInterface eth; 00011 eth.init(mbedIp,mbedMask,mbedGateway); //Use these parameters for static IP 00012 eth.connect(); 00013 pc.printf("Connected! IP Address is %s\n", eth.getIPAddress()); 00014 } 00015 00016
Generated on Thu Aug 11 2022 09:21:49 by 1.7.2