The IR Puck can mimic arbitrary infrared remote controls. Built on the Puck IOT platform.

Dependencies:   Puck IRSender mbed

The IR Puck is a puck that can mimic arbitrary infrared remote controls. This is useful for controlling things like TVs, radios, airconditioners, window blinds, and just about anything and everything that can be otherwise be controlled by a regular remote control.

A tutorial for the IR Puck is available on GitHub.

Tutorials and in-depth documentation for the Puck platform is available at the project's GitHub page

Files at this revision

API Documentation at this revision

Comitter:
cristea
Date:
Thu Jul 24 09:30:43 2014 +0000
Parent:
9:447b8e997426
Child:
11:822dbdcee1bb
Commit message:
Update logging to new logging system

Changed in this revision

IR.cpp Show annotated file Show diff for this revision Revisions of this file
Puck.lib 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/IR.cpp	Wed Jul 23 14:25:14 2014 +0000
+++ b/IR.cpp	Thu Jul 24 09:30:43 2014 +0000
@@ -2,6 +2,9 @@
 #include "IR.h"
 #include "TxIR.hpp"
 
+#define LOG_LEVEL_ERROR
+#include "Log.h"
+
 #define WORD(x, i) ((x)[(i)] << 8 | (x)[(i) + 1])
 
 TxIR txir(p14);
@@ -47,7 +50,7 @@
         return;
     } 
     
-    px.printf("Going to fire.\n");
+    LOG_INFO("Going to fire.\n");
     int raw_codes_length = 67;
     unsigned raw_codes[raw_codes_length];
     raw_codes[0] = WORD(header, 0);
@@ -70,14 +73,14 @@
     }
     raw_codes[66] = WORD(ptrail, 0);
     
-    px.printf("Full sequence received: [%i", raw_codes[0]);
+    LOG_INFO("Full sequence received: [%i", raw_codes[0]);
     for (int i=1; i<67; i++) {
         px.printf(", %i", raw_codes[i]);
     }
-    px.printf("]\n");
+    LOG_INFO("]\n");
     
     txir.txSeq(26, 67, raw_codes);
 
 
-    px.printf("Wrote message :)\n");
+    LOG_INFO("Wrote message :)\n");
 }
\ No newline at end of file
--- a/Puck.lib	Wed Jul 23 14:25:14 2014 +0000
+++ b/Puck.lib	Thu Jul 24 09:30:43 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/Nordic-Pucks/code/Puck/#5432b38585ea
+http://mbed.org/users/cristea/code/Puck/#c07c01c2a741
--- a/main.cpp	Wed Jul 23 14:25:14 2014 +0000
+++ b/main.cpp	Thu Jul 24 09:30:43 2014 +0000
@@ -1,7 +1,8 @@
 #include "mbed.h"
 #include "IR.h"
 
-#define LOG_LEVEL_VERBOSE
+#define LOG_LEVEL_ERROR
+#include "Log.h"
 #include "Puck.h"
 
 Puck* puck = &Puck::getPuck();