Infrared Rays library

Dependents:   mbed_IR

See http://developer.mbed.org/users/yasuyuki/notebook/IRmbed/

Revision:
0:c74b212c3cbf
Child:
1:71ca050c4d05
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IR.h	Thu Jun 26 13:56:36 2014 +0000
@@ -0,0 +1,34 @@
+//**********************
+// IR.h for mbed
+//
+// (C)Copyright 2014 All rights reserved by Y.Onodera
+// http://einstlab.web.fc2.com
+//**********************
+
+#ifndef IR_H_
+#define IR_H_
+
+#include "mbed.h"
+
+class IR{
+public:
+    IR (PinName irin);
+    void init();
+
+    unsigned char CountHigh();
+    unsigned char CountLow();
+    void GetIR2();
+    void GetIR();
+    
+    unsigned char buf[16];  // max 128bits
+    unsigned char mode;     // 0:NEC, 1:STD
+    unsigned char bits;
+
+protected:
+    
+    DigitalIn _irin;
+
+};
+
+
+#endif /* IR_H_ */