Geolocation and NTP Example for WizFi250 on WIZwiki-W7500
Dependencies: Adafruit_GFX HTTPClient NTPClient WizFi250Interface mbed
System Diagram
I want to make a watch, that can check my location and time. So I decide to make this watch using Wi-Fi module(WizFi250) and Cortex-M0 MCU(WIZwiki-W7500). For getting geolocation of this watch, I used ip-api.com which geolocation server and I used NTP server for getting current time. This picture is system diagram of my project.
Materials
WIZwiki-W7500 ( MCU )
WizFi250-EVB ( Wi-Fi Module )
Sensor Shield
SSD1306 OLED
Refer to this URL.
https://developer.mbed.org/components/Adafruit-OLED-128x32/
Hardware Configuration
UART0 RX/TX/CTS/RTS pins of WIZwiki-W7500 board are used to control WizFi250 which Wi-Fi module and It use I2C SDA/SCL pins for using SSD1306 OLED.
Demo Video
For more detailed information, refer to this URL.
Revision 4:6d1627cfb314, committed 2015-10-21
- Comitter:
- kaizen
- Date:
- Wed Oct 21 05:54:18 2015 +0000
- Parent:
- 3:1f2938317c31
- Commit message:
- Delete OLED Code
Changed in this revision
diff -r 1f2938317c31 -r 6d1627cfb314 WizFi250Interface.lib --- a/WizFi250Interface.lib Wed Aug 26 00:44:40 2015 +0000 +++ b/WizFi250Interface.lib Wed Oct 21 05:54:18 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/kaizen/code/WizFi250Interface/#3a2282277ad0 +http://mbed.org/users/kaizen/code/WizFi250Interface/#4fd47f387930
diff -r 1f2938317c31 -r 6d1627cfb314 main.cpp --- a/main.cpp Wed Aug 26 00:44:40 2015 +0000 +++ b/main.cpp Wed Oct 21 05:54:18 2015 +0000 @@ -6,8 +6,8 @@ #define SECURE WizFi250::SEC_AUTO -#define SSID "wizms1" -#define PASS "maker0701" +#define SSID "DIR-815_Wiznet" +#define PASS "12345678" #if defined(TARGET_WIZwiki_W7500) @@ -90,8 +90,8 @@ parse(httpGetData,&j,latitude); parse(httpGetData,&j,longitude); parse(httpGetData,&j,timeZone); - //gOled.printf("HTTP Data Received\r\n"); - //gOled.display(); +// gOled.printf("HTTP Data Received\r\n"); +// gOled.display(); printf("HTTP Data Received\r\n"); } else { //HTTP GET REQUEST ERRORED @@ -116,9 +116,6 @@ // gOled.printf("%s, %s %s, %s\r\n",city,stateAbrv,zip,countryAbrv); //PRINT CITY STATE AND ZIP INFORMATION AND COUNTRY // gOled.printf("LAT:%s\r\nLONG:%s\r\n",latitude,longitude); //PRINT LATITUDE AND LONGITUDE // gOled.printf("Timezone:%s\r\n",timeZone); //PRINT TIMEZONE - printf("%s, %s %s, %s\r\n",city,stateAbrv,zip,countryAbrv); //PRINT CITY STATE AND ZIP INFORMATION AND COUNTRY - printf("LAT:%s\r\nLONG:%s\r\n",latitude,longitude); //PRINT LATITUDE AND LONGITUDE - printf("Timezone:%s\r\n",timeZone); //PRINT TIMEZONE wizfi250.disconnect(); //DISCONNECT FROM THE NETWORK @@ -130,6 +127,9 @@ // gOled.printf("Univ Time Clock\r\n%s\r\n", buffer); // gOled.display(); // gOled.setTextCursor(0,40); + printf("%s, %s %s, %s\r\n",city,stateAbrv,zip,countryAbrv); //PRINT CITY STATE AND ZIP INFORMATION AND COUNTRY + printf("LAT:%s\r\nLONG:%s\r\n",latitude,longitude); //PRINT LATITUDE AND LONGITUDE + printf("Timezone:%s\r\n",timeZone); //PRINT TIMEZONE printf("Univ Time Clock\r\n%s\r\n", buffer); wait(1); }
diff -r 1f2938317c31 -r 6d1627cfb314 mbed-src.lib --- a/mbed-src.lib Wed Aug 26 00:44:40 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/#bc40b8d2aec4
diff -r 1f2938317c31 -r 6d1627cfb314 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Oct 21 05:54:18 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file