set led to common anode

Dependencies:   C12832_lcd EthernetInterface LM75B MMA7660 libxively mbed-rtos mbed

Fork of xively-dreamforce by Ilya Dmitrichenko

Files at this revision

API Documentation at this revision

Comitter:
errordeveloper
Date:
Mon Nov 11 18:04:50 2013 +0000
Parent:
16:878226cefdb1
Child:
18:07869e8bddb2
Commit message:
LED1 will indicate when data is communicated to Xively

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Mon Nov 11 17:34:30 2013 +0000
+++ b/main.cpp	Mon Nov 11 18:04:50 2013 +0000
@@ -15,6 +15,7 @@
 
 LM75B tmp(p28, p27);
 DigitalOut fan(p22);
+PwmOut progress_led(LED1);
 C12832_LCD lcd;
 
 #include "logo.h"
@@ -88,7 +89,9 @@
       xi_set_value_f32( temp, tmp.read() );
         
       printf( "Updating output channels...\r\n" );
+      progress_led = 0.6;
       xi_feed_update( xi_context, &output_channels );
+      progress_led = 0.1;
       printf( "   [%s]\r\n", xi_get_error_string( xi_get_last_error() ) );
       
       printf( "Reading input channels...\r\n" );
@@ -119,5 +122,6 @@
       }
       
       wait( 5.0 );
+      progress_led = 0;
     }
 }