Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: WebSocketClient WizFi250Interface mbed
Revision 0:97037d9415b8, committed 2014-11-14
- Comitter:
- kaizen
- Date:
- Fri Nov 14 08:18:59 2014 +0000
- Commit message:
- This is first commit for WebSocket_WizFi250_HelloWorld
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WebSocketClient.lib Fri Nov 14 08:18:59 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/samux/code/WebSocketClient/#4567996414a5
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WizFi250Interface.lib Fri Nov 14 08:18:59 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/kaizen/code/WizFi250Interface/#431172d536ee
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Nov 14 08:18:59 2014 +0000
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2014 Wiznet, MIT License
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
+ * and associated documentation files (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute,
+ * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in all copies or
+ * substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
+ * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "mbed.h"
+#include "WizFi250Interface.h"
+#include "Websocket.h"
+
+#define SECURE WizFi250::SEC_AUTO
+#define SSID "YOUR-SSID"
+#define PASS "YOUR-PASSWORD"
+
+#if defined(TARGET_LPC1768)
+ #define _TXD p28
+ #define _RXD p27
+ #define _RTS NC
+ #define _CTS NC
+ #define _RESET p21
+ #define _BAUD 115200
+#elif defined(TARGET_KL25Z)
+ #define _TXD PTE0
+ #define _RXD PTE1
+ #define _RTS NC
+ #define _CTS NC
+ #define _RESET PTD4
+ #define _BAUD 115200
+#endif
+
+Serial pc(USBTX,USBRX);
+WizFi250Interface wizfi250(_TXD,_RXD,_RTS,_CTS,_RESET,NC,_BAUD,&pc);
+
+int main()
+{
+ printf("Start Application\r\n");
+
+ wizfi250.init();
+ while (wizfi250.connect(SECURE, SSID, PASS));
+ printf("IP Address is %s\r\n", wizfi250.getIPAddress());
+
+ Websocket ws("ws://sockets.mbed.org:443/ws/kaizen/wo");
+ while (!ws.connect());
+
+ while(1)
+ {
+ printf("Send:Websocket Hello World over WizFi250\r\n");
+ ws.send("Websocket Hello World over WizFi250");
+ wait(1.0);
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Nov 14 08:18:59 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/031413cf7a89 \ No newline at end of file