YIC day 2

Dependencies:   RemoteIR mbed

Files at this revision

API Documentation at this revision

Comitter:
lingtien5846
Date:
Thu Apr 02 05:12:58 2015 +0000
Commit message:
YIC day 2

Changed in this revision

RemoteIR.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
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 76b2279d6a55 RemoteIR.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RemoteIR.lib	Thu Apr 02 05:12:58 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/shintamainjp/code/RemoteIR/#268cc2ab63bd
diff -r 000000000000 -r 76b2279d6a55 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Apr 02 05:12:58 2015 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "TransmitterIR.h"
+
+DigitalOut lpc1768_led_1(LED1);
+DigitalOut grove_button(p20);
+
+TransmitterIR ir_tx(p21);
+
+int main() {
+    lpc1768_led_1 = 0;
+    while(1) {
+        if (grove_button) {
+            lpc1768_led_1 = 1;
+            
+            RemoteIR::Format format = RemoteIR::SONY;
+            uint8_t buf[] = { 0x80, 0x00 };
+            int bitcount = 12;
+            if (ir_tx.getState() == TransmitterIR::Idle) {
+                bitcount = ir_tx.setData(format, buf, bitcount);
+            }               
+        }
+        lpc1768_led_1 = 0;
+    }
+}
diff -r 000000000000 -r 76b2279d6a55 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Apr 02 05:12:58 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e188a91d3eaa
\ No newline at end of file