User Tools

Site Tools


products:wizwiki_mbed_kit:kit_en:tutorial_en:exam1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

products:wizwiki_mbed_kit:kit_en:tutorial_en:exam1 [2015/08/13 14:43] (current)
kevinlee created
Line 1: Line 1:
 +====== Tutorial Exercise 1. Blinking LED ======
 +
 +===== Outline =====
 +Users can connect the mbed platform board with the PC and compile online.
 +Users can also blink the LED using the example program provided for the platform board.
 +
 +===== What you need =====
 +
 +  * WIZwiki-W7500 board
 +  * USB cable
 +
 +===== Log on to mbed website =====
 +
 +Please log on to [[https://​developer.mbed.org|mbed website]]mbed website for further testing.
 +If you haven’t signed up yet, please sign up.
 +[[products:​wizwiki_mbed_kit:​kit_kr:​tutorial_kr:​mbed_register|Sign-up at ARM mbed Developer Site]]
 +
 +
 +=== Connect the PC with mbed platform board ===
 +Connect the PC with WIZwiki-W7500 using the USB cable.
 +{{:​products:​wizwiki_mbed_kit:​kit_kr:​bd_usb_connected.jpg|}}
 +The PC will read the driver like a USB driver.
 +
 +=== Open the mbed compiler ===
 +
 +Click “Open mbed Compiler” as shown below.
 +
 +{{:​products:​wizwiki_mbed_kit:​kit_kr:​105_wizwiki.png|}}
 +
 +
 +
 +A pop-up will appear and “Blinky LED Hello World” will be set as the template and “mbed_blinky” will be set as the Default program name.
 +
 +{{:​products:​wizwiki_mbed_kit:​kit_kr:​106_program_name.png|}}
 +
 +
 +Click OK and the mbed_blinky program will be copied to my Program Workspace.
 +
 +{{:​products:​wizwiki_mbed_kit:​kit_kr:​107_mbed_blinky_main.png|}}
 +
 +
 +Clik the Compile icon from the menu to compile the example code. Success message will appear below if an error is not occurred during compiling.
 +
 +{{:​products:​wizwiki_mbed_kit:​kit_kr:​108_compile_end.png|}}
 +
 +
 +Once compiling is successful, download the mbed_blinky_WIZWIKI-W7500.bin file to the PC.
 +
 +{{:​products:​wizwiki_mbed_kit:​kit_kr:​109_bin.png|}}
 +
 +
 +==== Example Code ====
 +<code c>
 +#include "​mbed.h"​
 +
 +DigitalOut myled(LED1);​
 +
 +int main() {
 +    while(1) {
 +        myled = 1;
 +        wait(0.2);
 +        myled = 0;
 +        wait(0.2);
 +    }
 +}
 +</​code>​
 +
 +==== Run exercise and Check test result ====
 +
 +Copy and paste the mbed_blinky_WIZWIKI_W7500.bin file to the mbed driver (E: or F:)
 +{{:​products:​wizwiki_mbed_kit:​kit_kr:​110_copy.png|}}
 +
 +Then press the reset pin. The LED (blue circle) shown in the below image will blink every 0.2 second.
 +{{:​products:​wizwiki_mbed_kit:​kit_kr:​wizwiki_led1.png|WIZwiki-W7500 LED1}}
 +
 +If the LED blinks successfully,​ it means that the example code is operating on the WIZwiki-W7500 board. This exercise making the LED blink is called “Hello World.”
 +
 +Users can test with different time value of the wait function.
 +
 +
 +===== Related Links =====
 +  *[[products:​wizwiki_mbed_kit:​kit_en:​tutorial_en|Starter Kit Tutorial]]
 +
 +===== Next Exercise =====
 +  *[[products:​wizwiki_mbed_kit:​kit_en:​tutorial_en:​exam2|Exercise 2. Data output using serial port]]
  
products/wizwiki_mbed_kit/kit_en/tutorial_en/exam1.txt · Last modified: 2015/08/13 14:43 by kevinlee