demo of the murata wifi chip. This demo tries to connect to an open wifi access point and prints out all the relevant information about the connection. It then scans all wifi access points nearby and reports their information.

Dependencies:   SNICInterface mbed-rtos mbed

Fork of SNIC-xively-jumpstart-demo by muRata

Revision:
11:bdf601a405fc
Parent:
10:86ffba646df1
Child:
12:27471bb09274
Child:
14:6d58d3855feb
--- a/main.cpp	Mon Oct 14 12:08:18 2013 +0000
+++ b/main.cpp	Mon Oct 14 13:33:04 2013 +0000
@@ -1,7 +1,7 @@
 #include "mbed.h"
 #include "EthernetInterface.h"
 
-#define XI_FEED_ID 128488 // set Xively Feed ID (numerical, no quoutes
+#define XI_FEED_ID 128488 // set Xively Feed ID (numerical, no quoutes)
 #define XI_API_KEY "T4KXAH_dasgw1PWBPc3fdsfsdgsdy-dUc4ND0g" // set Xively API key (double-quoted string)
 
 #include "app_board_io.h"
@@ -11,12 +11,16 @@
 
 #include "MMA7660.h"
 #include "LM75B.h"
+#include "C12832_lcd.h"
 
 MMA7660 axl(p28, p27);
 LM75B tmp(p28, p27);
+C12832_LCD lcd;
+
+#include "logo.h"
 
 int main() {
-    
+    lcd_print_xively_logo();
     EthernetInterface eth;
     
     int s = eth.init(); //Use DHCP
@@ -69,10 +73,6 @@
     {
         return -1;
     }
-    
-    lcd_printf("feed:%d datastreams:[%s,%s]\n", feed.feed_id,
-                    orientation_datastream->datastream_id,
-                    side_rotation_datastream->datastream_id);
 
     while(1) {
       
@@ -90,23 +90,15 @@
       
       switch( axl.getOrientation() ) {
         case MMA7660::Down:
-          lcd_printf("down %s\n",
-            (axl.getSide() == MMA7660::Front ? "front" : "back"));
           xi_set_value_str( current_orientation, "down" );
           break;
         case MMA7660::Up:
-           lcd_printf("up %s\n",
-            (axl.getSide() == MMA7660::Front ? "front" : "back"));
            xi_set_value_str( current_orientation, "up" );
            break;
         case MMA7660::Right:
-          lcd_printf("right %s\n",
-            (axl.getSide() == MMA7660::Front ? "front" : "back"));
           xi_set_value_str( current_orientation, "right" );
           break;
         case MMA7660::Left:
-          lcd_printf("left %s\n",
-            (axl.getSide() == MMA7660::Front ? "front" : "back"));
           xi_set_value_str( current_orientation, "left" );
           break;
         default: 
@@ -117,7 +109,7 @@
       xi_set_value_f32( current_temperature, tmp.read() );
         
       lcd_printf( "update...\n" );
-      xi_feed_update(xi_context, &feed);
+      xi_feed_update( xi_context, &feed );
       lcd_printf( "done...\n" );
       
       wait( 15.0 );