Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
2个arduinos之间的红外通信_Arduino_Infrared - Fatal编程技术网

2个arduinos之间的红外通信

2个arduinos之间的红外通信,arduino,infrared,Arduino,Infrared,我有2个arduinos,我想用红外LED从第一个arduino(串行监视器的输入)发送到第二个arduino 我用的是这样的东西: void setup() { Serial.begin(9600); Serial.println("Enter a word or a phrase:"); } void loop() { if (Serial.available() > 0) { serialinput = Serial.read(); }

我有2个arduinos,我想用红外LED从第一个arduino(串行监视器的输入)发送到第二个arduino

我用的是这样的东西:

void setup() 
{
  Serial.begin(9600);
  Serial.println("Enter a word or a phrase:");
}

void loop() 
{
   if (Serial.available() > 0) 
   {
       serialinput = Serial.read();
   }
   /*then i want here to use an irsend to put the serialinput and send it, 
   via ir to the other arduino 
   and see it in the serial monitor of the receiver. */
   // something like this: irsend.sendSony(serialinput, 20)
}
那么,你能告诉我这是否可行,我应该使用哪个irsend,因为我不知道它们之间的区别吗?(例如,有sendSony、sendNEC、send RC5和许多其他产品)。 或者如果我能从某处了解到他们的不同,因为我找不到他们