WIZ Proto Makers 3th Network

Dependencies:   WIZnetInterface mbed

Fork of WIZwiki-W7500-lecture by Bohyun Bang

main.cpp

Committer:
Ricky_Kwon
Date:
2016-02-03
Revision:
3:cb2bf9e077f0
Parent:
2:ba228e5b659c
Child:
4:fb02cd21f3dc

File content as of revision 3:cb2bf9e077f0:

#include "mbed.h"
#include "EthernetInterface.h"

int main() {
    
    EthernetInterface eth;
    
    uint8_t mac_addr[6] = {0x00, 0x08, 0xDC, 0x00, 0x01, 0x02};
    eth.init(mac_addr, "192.168.0.180", "255.255.255.0", "192.168.0.1"); // USE Static IP
    //eth.init(mac_addr); //Use DHCP
    eth.connect();
     
    printf("IP Address is %s\r\n", eth.getIPAddress());

    eth.disconnect();

}