|
发表于 2012-12-1 14:54:39
|
显示全部楼层
直接这样就可以了- /*
- * 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;
- int i;
- void setup()
- {
- Serial.begin(57600);
- }
- void loop() {
- if (Serial.read() != -1)
- {
- irsend.sendSony(0x810, 12); // Sony TV power code
- delay(100);
- }
- }
复制代码 |
|