TeamE7

Dependencies:   EthernetInterface HTTPServer RemoteIR SDFileSystem mbed-rpc mbed-rtos mbed

Fork of SmartRemote by Sam Kirsch

Revision:
6:70a0af38edcc
Parent:
4:36e0aa194b45
Child:
7:7b3f53b5e737
--- a/main.cpp	Tue Dec 03 02:41:56 2013 +0000
+++ b/main.cpp	Tue Dec 03 03:49:12 2013 +0000
@@ -5,6 +5,8 @@
 #include "RpcHandler.h"
 #include "rtos.h"
 
+DigitalOut led1(LED1);
+
 //Start IR
 #include "ReceiverIR.h"
 #include "TransmitterIR.h"
@@ -100,6 +102,22 @@
         if(tm.read()>.5) {
             tm.start();
         }
+        if (Learn) {
+            led1 = 1;
+            {
+                bitlength1 = receive(&format, buf1, sizeof(buf1));
+                if (bitlength1 < 0) {
+                    continue;
+                }
+                display_status("RECV", bitlength1);
+                display_data(buf1, bitlength1);
+                //display_format(format);
+            }
+            printf("%d",buf1);
+            led1 = 0;
+            Learn = 0;
+        }
+
     }
 
     return 0;