arduino stuffs
Diffstat (limited to 'libraries/IRremote/examples/IRsendDemo/IRsendDemo.pde')
-rwxr-xr-xlibraries/IRremote/examples/IRsendDemo/IRsendDemo.pde26
1 files changed, 26 insertions, 0 deletions
diff --git a/libraries/IRremote/examples/IRsendDemo/IRsendDemo.pde b/libraries/IRremote/examples/IRsendDemo/IRsendDemo.pde
new file mode 100755
index 0000000..6941382
--- /dev/null
+++ b/libraries/IRremote/examples/IRsendDemo/IRsendDemo.pde
@@ -0,0 +1,26 @@
+/*
+ * IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
+ * An IR LED must be connected to Arduino PWM pin 3.
+ * Version 0.1 July, 2009
+ * Copyright 2009 Ken Shirriff
+ * http://arcfn.com
+ */
+
+#include <IRremote.h>
+
+IRsend irsend;
+
+void setup()
+{
+ Serial.begin(9600);
+}
+
+void loop() {
+ if (Serial.read() != -1) {
+ for (int i = 0; i < 3; i++) {
+ irsend.sendSony(0xa90, 12); // Sony TV power code
+ delay(100);
+ }
+ }
+}
+