Hello world demo for WizFi250.
Dependencies: WizFi250Interface mbed
This is hello world example for using WizFi250 with WIZwiki-W7500.
Hardware Connection
Run WizFi250-HelloWorld Program
WizFi250 library what you can use for mbed platform is already made by me. So I think you can use Wi-Fi module(WizFi250) on mbed platform without another work.
Source Code
You have to change the SSID and PASS value at source code in your web compiler.
WizFi250 hello world
#include <stdio.h> #include "mbed.h" #include "WizFi250Interface.h" #define SECURE WizFi250::SEC_AUTO #define SSID "ssid" #define PASS "key" #if defined(TARGET_WIZwiki_W7500) WizFi250Interface wizfi250(D1,D0,D7,D8,PA_12,NC,115200); Serial pc(USBTX, USBRX); #endif /** * \brief Hello World * \param none * \return int */ int main() { pc.baud(115200); printf("WizFi250 Hello World demo. \r\n"); wizfi250.init(); if ( wizfi250.connect(SECURE, SSID, PASS)) return -1; printf("IP Address is %s\r\n", wizfi250.getIPAddress()); wizfi250.disconnect(); }
Result in serial terminal
After modifying the source code, you can compile this example on your web compiler, if you push “Ctrl+D” then if you download it to WIZwiki-W7500, You can show the result on Serial Terminal as below.(Serial Baudrate is 115200)
For more detailed information, refer to this url.
Revision 3:2f7c0c22a4fd, committed 2015-10-20
- Comitter:
- kaizen
- Date:
- Tue Oct 20 11:41:11 2015 +0000
- Parent:
- 2:054a907c36d6
- Commit message:
- change to mbed library
Changed in this revision
diff -r 054a907c36d6 -r 2f7c0c22a4fd main.cpp --- a/main.cpp Thu Jul 30 04:14:32 2015 +0000 +++ b/main.cpp Tue Oct 20 11:41:11 2015 +0000 @@ -23,8 +23,8 @@ #define SECURE WizFi250::SEC_AUTO -#define SSID "ssid" -#define PASS "key" +#define SSID "DIR-815_Wiznet" +#define PASS "12345678" #if defined(TARGET_WIZwiki_W7500) WizFi250Interface wizfi250(D1,D0,D7,D8,PA_12,NC,115200);
diff -r 054a907c36d6 -r 2f7c0c22a4fd mbed-src.lib --- a/mbed-src.lib Thu Jul 30 04:14:32 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -http://mbed.org/users/mbed_official/code/mbed-src/#2d5fc5624619
diff -r 054a907c36d6 -r 2f7c0c22a4fd mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 20 11:41:11 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file