A smart remote using the sparkfun IR transmitter and receiver. The program also uses a web server to show the buttons on a mobile platform.

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

Fork of SmartRemoteClean by Sarvagya Vaish

Revision:
14:2b63c0f795cb
Parent:
10:da52ff0b93c0
--- a/db.cpp	Tue Dec 03 16:02:15 2013 +0000
+++ b/db.cpp	Tue Dec 03 16:21:52 2013 +0000
@@ -57,8 +57,10 @@
     }
 }
 
-void db_find_tuple(FILE *fread, int id_to_find, char *tuple_name, char *tuple_code, char *tuple_bitlength, char *tuple_format)
+void db_find_tuple(int id_to_find, char *tuple_name, char *tuple_code, char *tuple_bitlength, char *tuple_format)
 {
+    FILE *fread = fopen("/sd/SmartRemote/db.txt", "r");
+    
     char tuple_id[128];
     int id;
 
@@ -80,7 +82,8 @@
     }
 
     printf("Tuple Found: |%s| \t |%s| \t |%s| \t |%s| \t |%s|\n", tuple_id, tuple_name, tuple_code, tuple_bitlength, tuple_format);
-
+    
+    fclose(fread);
 }
 
 void db_get_tuple(FILE *fread, char *id_str, char *name_str, char *code_str, char *bitlength_str, char *format_str)