LED Blink by Remote PC Using WIZwiki-W7500 Mbed Platform

by kiyonglab in Circuits > Microcontrollers

858 Views, 2 Favorites, 0 Comments

LED Blink by Remote PC Using WIZwiki-W7500 Mbed Platform

LED_blink_remote_PC_WIZwiki-W7500.jpg

I introduce a LED blink controlling from remote PC through network (TCP protocol).

A TCP client program runs in the PC and a TCP server runs in a WIZwiki-W7500 mbed platform board. W7500 transmits data to PC and receives data from PC through TOE(TCP/IP Offload Engine). W7500 controls LED by executing some command received from remote PC.

Using mbed library, the software can be easily implemented.

You can learn how to control LED from remote PC.

This example will help makers who want to make IoT device for Home Automation or Building Automation.

Tools and Materials

Hardware

TCP Loopback_system_config.jpg

Network configuration diagram

​Software

  • Compiler
    • ARM mbed Web Compiler
  • Test program
    • Terminal program
      • EX) Teraterm, Hercules, Hyperterminal, etc.
      • It is used for checking serial port message.
    • TCP/IP Client Server terminal program
      • EX) Hercules etc.
      • It is used for transmitting and receiving message.
  • Example code

Firmware Programming and Connecting Boards

  1. FW programming
  2. Connecting boards
    • Connect your PC and a Hub with LAN cable.
    • Connect a WIZwiki-W7500 board and a Hub with LAN cable.
    • Connect the PC and the WIZwiki-W7500 board with USB cable.

Run Test Software and Check Serial Port Message

tcp_led_dhcp_1.jpg
tcp_led_client_1.jpg
tcp_led_server_1.jpg
  1. Run test software
    • Execute Serial Terminal program in the PC.
    • First press Reset Switch of WIZwiki board and check the message. IP address was assigned after DHCP operation.
    • Execute Hercules program on a PC.
  2. Check serial port message
    • Set TCP Client menu in the Hercules program.
    • This is a screenshot of Teraterm. The Client of PC is connected to Server of WIZwiki-W7500.
    • TCP Client send some message to WIZwiki board. The WIZwiki board sends back reversed message to TCP Client.

Send LED Control Message

tcp_led_on_client.JPG
tcp_led_on_server.JPG
tcp_led_off_client.jpg
tcp_led_off_server.jpg
  1. Send LED control message and Check LED blink
    • TCP Client sends “LED_ON” to WIZwiki, then LED turns on.
    • TCP Client sends “any message” except “LED_ON” to WIZwiki, the LED turns off.
    • LED ON/OFF can be shown in blue circle part of the board picture.

Test Result

tcp_led_on_off.png

Check LED blink

  • LED ON/OFF can be shown in blue circle part of the board picture.

This is the last page of this tutorial.

LED ON and OFF can be controlled from remote PC through network (TCP protocol).

Using ARM mbed library and example codes, the software can be easily implemented.

This example will help you make your own IoT device that needs Ethernet connection for Home Automation or Building Automation.