:)

Dependencies:   MbedJSONValue DebounceIn TextLCD USBDevice mbed WebSocketClient cc3000_hostdriver_mbedsocket Adafruit_LEDBackpack_2

Files at this revision

API Documentation at this revision

Comitter:
jn80842
Date:
Sun Nov 23 05:45:51 2014 +0000
Parent:
2:9c23adbfe9af
Child:
4:5d27966f93e4
Commit message:
added wifi dependencies and initialization

Changed in this revision

Adafruit_LEDBackpack.lib Show diff for this revision Revisions of this file
MbedJSONValue.lib Show annotated file Show diff for this revision Revisions of this file
WebSocketClient.lib Show annotated file Show diff for this revision Revisions of this file
cc3000_hostdriver_mbedsocket.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Adafruit_LEDBackpack.lib	Wed Nov 19 23:37:31 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://developer.mbed.org/users/ddrew73/code/Adafruit_LEDBackpack_2/#0491b3f9a639
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MbedJSONValue.lib	Sun Nov 23 05:45:51 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/samux/code/MbedJSONValue/#10a99cdf7846
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/WebSocketClient.lib	Sun Nov 23 05:45:51 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/cc3000_hostdriver_mbedsocket.lib	Sun Nov 23 05:45:51 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/Kojto/code/cc3000_hostdriver_mbedsocket/#ca8c234997c0
--- a/main.cpp	Wed Nov 19 23:37:31 2014 +0000
+++ b/main.cpp	Sun Nov 23 05:45:51 2014 +0000
@@ -5,6 +5,9 @@
 #include "TextLCD.h"
 #include "DebounceIn.h"
 #include "USBKeyboard.h"
+#include "cc3000.h"
+#include "Websocket.h"
+#include "MbedJSONValue.h"
 
 //LED stuff
 I2C i2c(D7,D6);
@@ -34,6 +37,20 @@
 //LCD stuff
 TextLCD lcd(D13,D12,PTA17,PTA16,PTC17,PTC16,TextLCD::LCD20x4);
 
+// cc3000 KL25Z wifi connection
+// we need to define connection pins for:
+// - IRQ      => (pin D3)
+// - Enable   => (pin D5)
+// - SPI CS   => (pin D10)
+// - SPI MOSI => (pin D11)
+// - SPI MISO => (pin D12)
+// - SPI CLK  => (pin D13)
+// plus wifi network SSID, password, security level and smart-configuration flag.
+
+mbed_cc3000::cc3000 wifi(D3, D5, D10, SPI(D11, D12, D13),
+                         "SSID", "PASSWORD", WPA2, false);
+Websocket ws("ws://sockets.mbed.org/ws/toastboard/rw");
+
 int main()
 {