Demo application of SNICInterface library for Murata TypeYD, which reports sensor data periodically to Xively cloud server . Hardware platform: mbed application board (https://mbed.org/cookbook/mbed-application-board), mbed LPC1768 (https://mbed.org/platforms/mbed-LPC1768/) and TypeYD.
Dependencies: C12832 LM75B MMA7660 SNICInterface libxively mbed-rtos mbed
Diff: main.cpp
- Revision:
- 20:f0c7f5ca7e8a
- Parent:
- 19:4e2900daad59
- Child:
- 21:25b85cbbdd82
--- a/main.cpp Thu Jun 19 10:16:36 2014 +0000
+++ b/main.cpp Wed Jun 25 08:08:56 2014 +0000
@@ -22,8 +22,6 @@
#include "logo.h"
#define DEMO_AP_SSID "E2N1-Lab-Buffalo-D302"
-//#define DEMO_AP_SECURITY_TYPE e_SEC_OPEN
-//#define DEMO_AP_SECUTIRY_KEY ""
#define DEMO_AP_SECURITY_TYPE e_SEC_WPA2_AES
#define DEMO_AP_SECUTIRY_KEY "12345678"
#define DEMO_AP_SECUTIRY_KEY_LEN 8
@@ -50,8 +48,14 @@
lcd_printf( "Could not initialise. Will halt!\n" );
return -1;
}
-
+ wait(0.5);
+ s = mSNICwifi.disconnect();
lcd_printf("disconnect();\r\n");
+ if( s != 0 )
+ {
+ printf( "disconnect failed\r\n" );
+ return -1;
+ }
wait(0.3);
// Connect AP
@@ -100,7 +104,6 @@
}
while(1) {
-
switch( axl.getSide() ) {
case MMA7660::Front:
xi_set_value_str( current_side_rotation, "front" );
muRata
Murata TypeYD