恩,可以了,再问个问题irsend.sendRaw(ch1,67,38)这个函数会一次性将数组ch1里面的数据发送出去吗,我用的2560的板子;
#include <IRremote.h>
IRsend irsend;
unsigned int ch1[]={9000,4450,650,450,650,500,600,550,550,550,600,
500,650,500,600,500,600,500,600,1650,600,1650,600,1650,550,1700,
600,1600,600,1650,600,1650,650,1600,600,1650,600,500,600,1650,600,
500,600,500,650,500,600,1650,600,550,550,550,600,1650,550,550,600,
1650,550,1700,600,1650,600,500,650,1600,600};
void setup()
{
Serial.begin(9600);
}
void loop()
{
irsend.sendRaw(ch1,67,38);
delay(5000);
Serial.println("just ");
}
看串口时会显示just,但我用另一块板子做的接收端却接收不到数据,书上和论坛里用arduino Uno 做的,接的3口,那用2560时接口一样吗? |