Emdev project smart remote E2

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

Fork of SmartRemote by Sam Kirsch

Files at this revision

API Documentation at this revision

Comitter:
emdeve2
Date:
Mon Jan 30 10:55:15 2017 +0000
Parent:
16:2d23297857bc
Commit message:
Smart-remote E2

Changed in this revision

db.cpp Show annotated file Show diff for this revision Revisions of this file
db.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/db.cpp	Wed Dec 04 17:44:29 2013 +0000
+++ b/db.cpp	Mon Jan 30 10:55:15 2017 +0000
@@ -11,7 +11,7 @@
     char tuple_bitlength[128];
     char tuple_format[128];
     int id = 0;
-
+    string pad = "";
     // create file if it does not exist
     FILE *ftemp = fopen("/sd/SmartRemote/db.txt", "a");
     fclose(ftemp);
--- a/db.h	Wed Dec 04 17:44:29 2013 +0000
+++ b/db.h	Mon Jan 30 10:55:15 2017 +0000
@@ -1,4 +1,5 @@
 #include "mbed.h"
+#include <string>
 
 void db_get_tuple(FILE *fread, char *id_str, char *name_str, char *code_str, char *bitlength, char *format);
 void db_print_all(FILE *fread);
--- a/main.cpp	Wed Dec 04 17:44:29 2013 +0000
+++ b/main.cpp	Mon Jan 30 10:55:15 2017 +0000
@@ -9,6 +9,8 @@
 DigitalOut led1(LED1);
 DigitalOut led2(LED2);
 
+DigitalOut led3(p21);
+
 //Start IR
 #include "ReceiverIR.h"
 #include "TransmitterIR.h"
@@ -38,6 +40,7 @@
 char Learn_name7;
 char Learn_name8;
 char Learn_name9;
+char Toestel;
 
 //Make these variables accessible over RPC by attaching them to an RPCVariable
 RPCVariable<int> RPCRequest(&Request, "Request");
@@ -52,6 +55,7 @@
 RPCVariable<char> RPCLearner7(&Learn_name7, "Learn_name7");
 RPCVariable<char> RPCLearner8(&Learn_name8, "Learn_name8");
 RPCVariable<char> RPCLearner9(&Learn_name9, "Learn_name9");
+RPCVariable<char> RPCToestel(&Toestel, "Toestel");
 // End RPC
 
 
@@ -66,7 +70,9 @@
 
 int main()
 {
-
+    while(1) {
+    led3 = 1;
+        }
     printf("Setting up Apache...\n \r");
 
     HTTPFsRequestHandler::mount("/local/", "/");