use several DFR0094 modules on the same arduino board

Hello,
I am happy with the DFR0094 module so I have ordered a couple others because I need to read IR commands from several IR units and not just one.
While they are being delivered to me i am working on the code and i am faced with a wierd behavior. With a DFR0094 module connected to pin 10, I have issues with the following code
if i uncomment the line
IRrecv irrecv2(11);
Then i get no IR codes at all
what's wrong ?
I must be missing something obvious
what am i supposed to do read IR codes from several DFR0094 modules on the same arduino board ?
thanks
fourchette
I am happy with the DFR0094 module so I have ordered a couple others because I need to read IR commands from several IR units and not just one.
While they are being delivered to me i am working on the code and i am faced with a wierd behavior. With a DFR0094 module connected to pin 10, I have issues with the following code
Code: Select all
/*
* IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
IRrecv irrecv1(10);
//IRrecv irrecv2(11); // just uncomment this line and no IR command are received at all ???
decode_results results;
void setup()
{
Serial.begin(115200);
irrecv1.enableIRIn(); // Start the receiver
//irrecv2.enableIRIn();
}
void loop() {
if (irrecv1.decode(&results)) {
Serial.println(results.value, HEX);
irrecv1.resume(); // Receive the next value
}
//if (irrecv2.decode(&results)) {
// Serial.println(results.value, HEX);
// irrecv2.resume();
//}
}
if i uncomment the line
IRrecv irrecv2(11);
Then i get no IR codes at all
what's wrong ?
I must be missing something obvious
what am i supposed to do read IR codes from several DFR0094 modules on the same arduino board ?
thanks
fourchette
2016-05-16 14:43:58 Hi
The fllowing code is my test code. And i connect two modules to the same uno. i transmit to the one of modules, i got correct IR codes, and then i transmit to the another module , i also got correct IR codes . if i transmit to the two modules at the same time , the result is also correct.
Wendy.Hu
The fllowing code is my test code. And i connect two modules to the same uno. i transmit to the one of modules, i got correct IR codes, and then i transmit to the another module , i also got correct IR codes . if i transmit to the two modules at the same time , the result is also correct.
Code: Select all
#include <IRremote.h>
IRrecv irrecv1(11);
IRrecv irrecv2(3); // just uncomment this line and no IR command are received at all ???
decode_results results1;
decode_results results2;
void setup()
{
Serial.begin(9600);
irrecv1.enableIRIn(); // Start the receiver
irrecv2.enableIRIn();
}
void loop() {
if (irrecv1.decode(&results1)) {
Serial.print("IR1=");
Serial.println(results1.value, HEX);
irrecv1.resume(); // Receive the next value
}
if (irrecv2.decode(&results2)) {
Serial.print("IR2=");
Serial.println(results2.value, HEX);
irrecv2.resume();
}
}
Code: Select all
IR1=FDA857
IR2=FDA857
IR1=FDA857
IR1=FDA857
IR1=FDA857
IR2=FDA857
IR2=FDA857

2016-05-16 14:43:58 Hi
The fllowing code is my test code. And i connect two modules to the same uno. i transmit to the one of modules, i got correct IR codes, and then i transmit to the another module , i also got correct IR codes . if i transmit to the two modules at the same time , the result is also correct.
Wendy.Hu
The fllowing code is my test code. And i connect two modules to the same uno. i transmit to the one of modules, i got correct IR codes, and then i transmit to the another module , i also got correct IR codes . if i transmit to the two modules at the same time , the result is also correct.
Code: Select all
#include <IRremote.h>
IRrecv irrecv1(11);
IRrecv irrecv2(3); // just uncomment this line and no IR command are received at all ???
decode_results results1;
decode_results results2;
void setup()
{
Serial.begin(9600);
irrecv1.enableIRIn(); // Start the receiver
irrecv2.enableIRIn();
}
void loop() {
if (irrecv1.decode(&results1)) {
Serial.print("IR1=");
Serial.println(results1.value, HEX);
irrecv1.resume(); // Receive the next value
}
if (irrecv2.decode(&results2)) {
Serial.print("IR2=");
Serial.println(results2.value, HEX);
irrecv2.resume();
}
}
Code: Select all
IR1=FDA857
IR2=FDA857
IR1=FDA857
IR1=FDA857
IR1=FDA857
IR2=FDA857
IR2=FDA857

2016-05-13 22:11:30 I followed advice regarding the lib thing, deleted directories both My Documents\Arduino\IRremote and
directories and used the "Add .ZIP library" menu to add the one you offered.
Now in "Manage Libraries..." menu, i can see listed:
IRremove by shirriff version 2.0.1 INSTALLED
still using 1.6.9, still using an arduino uno rev3.
In the mean time I got my other DFR0094 modules about an hour ago.
So i hooked up the second module to the 11th pin on the board. and used the following code to dispay what IR receiver receives what
I would output like
notice that ir codes seem to come from both sensors
However, I continue getting the same output even when i physically disconnect the module connected on pin 10.
==> the code does not work at all !
@Wendy.Hu => are you sure you are reading IR codes from 2 modules are the time ? could you kindly post the code snippet demonstrating that behavior please ? that would be great ! i'm lost here
alexisdal
directories and used the "Add .ZIP library" menu to add the one you offered.
Now in "Manage Libraries..." menu, i can see listed:
IRremove by shirriff version 2.0.1 INSTALLED
still using 1.6.9, still using an arduino uno rev3.
In the mean time I got my other DFR0094 modules about an hour ago.
So i hooked up the second module to the 11th pin on the board. and used the following code to dispay what IR receiver receives what
Code: Select all
#include <IRremote.h>
IRrecv irrecv1(10);
IRrecv irrecv2(11);
decode_results results1;
decode_results results2;
void setup()
{
Serial.begin(9600);
Serial.print("start\n");
irrecv1.enableIRIn(); // Start the receiver
irrecv2.enableIRIn();
}
void loop() {
if (irrecv1.decode(&results1)) {
Serial.print("IR1=");
Serial.print(results1.value, HEX);
Serial.print("\n");
irrecv1.resume(); // Receive the next value
}
if (irrecv2.decode(&results2)) {
Serial.print("IR2=");
Serial.print(results2.value, HEX);
Serial.print("\n");
irrecv2.resume();
}
}
I would output like
Code: Select all
start
IR2=6170A857
IR1=FFFFFFFF
IR1=FFFFFFFF
IR1=6170A857
IR2=FFFFFFFF
IR1=FFFFFFFF
IR2=6170A857
IR1=FFFFFFFF
notice that ir codes seem to come from both sensors
However, I continue getting the same output even when i physically disconnect the module connected on pin 10.
==> the code does not work at all !
@Wendy.Hu => are you sure you are reading IR codes from 2 modules are the time ? could you kindly post the code snippet demonstrating that behavior please ? that would be great ! i'm lost here

2016-05-13 22:11:30 I followed advice regarding the lib thing, deleted directories both My Documents\Arduino\IRremote and
directories and used the "Add .ZIP library" menu to add the one you offered.
Now in "Manage Libraries..." menu, i can see listed:
IRremove by shirriff version 2.0.1 INSTALLED
still using 1.6.9, still using an arduino uno rev3.
In the mean time I got my other DFR0094 modules about an hour ago.
So i hooked up the second module to the 11th pin on the board. and used the following code to dispay what IR receiver receives what
I would output like
notice that ir codes seem to come from both sensors
However, I continue getting the same output even when i physically disconnect the module connected on pin 10.
==> the code does not work at all !
@Wendy.Hu => are you sure you are reading IR codes from 2 modules are the time ? could you kindly post the code snippet demonstrating that behavior please ? that would be great ! i'm lost here
alexisdal
directories and used the "Add .ZIP library" menu to add the one you offered.
Now in "Manage Libraries..." menu, i can see listed:
IRremove by shirriff version 2.0.1 INSTALLED
still using 1.6.9, still using an arduino uno rev3.
In the mean time I got my other DFR0094 modules about an hour ago.
So i hooked up the second module to the 11th pin on the board. and used the following code to dispay what IR receiver receives what
Code: Select all
#include <IRremote.h>
IRrecv irrecv1(10);
IRrecv irrecv2(11);
decode_results results1;
decode_results results2;
void setup()
{
Serial.begin(9600);
Serial.print("start\n");
irrecv1.enableIRIn(); // Start the receiver
irrecv2.enableIRIn();
}
void loop() {
if (irrecv1.decode(&results1)) {
Serial.print("IR1=");
Serial.print(results1.value, HEX);
Serial.print("\n");
irrecv1.resume(); // Receive the next value
}
if (irrecv2.decode(&results2)) {
Serial.print("IR2=");
Serial.print(results2.value, HEX);
Serial.print("\n");
irrecv2.resume();
}
}
I would output like
Code: Select all
start
IR2=6170A857
IR1=FFFFFFFF
IR1=FFFFFFFF
IR1=6170A857
IR2=FFFFFFFF
IR1=FFFFFFFF
IR2=6170A857
IR1=FFFFFFFF
notice that ir codes seem to come from both sensors
However, I continue getting the same output even when i physically disconnect the module connected on pin 10.
==> the code does not work at all !
@Wendy.Hu => are you sure you are reading IR codes from 2 modules are the time ? could you kindly post the code snippet demonstrating that behavior please ? that would be great ! i'm lost here

2016-05-13 18:31:22 Thanks to Wendy for ngaging in.
And to Alexisdal, I think the previous problem should be the library compatibility with different Arduino IDE version. Now with the new library, it should be no problem, you can delete your older one to solve the library conflict if they do.
Leff
And to Alexisdal, I think the previous problem should be the library compatibility with different Arduino IDE version. Now with the new library, it should be no problem, you can delete your older one to solve the library conflict if they do.

2016-05-13 18:31:22 Thanks to Wendy for ngaging in.
And to Alexisdal, I think the previous problem should be the library compatibility with different Arduino IDE version. Now with the new library, it should be no problem, you can delete your older one to solve the library conflict if they do.
Leff
And to Alexisdal, I think the previous problem should be the library compatibility with different Arduino IDE version. Now with the new library, it should be no problem, you can delete your older one to solve the library conflict if they do.

2016-05-13 17:40:56
I feel like an idiot. there must be something obvious that i do not get. I have checked all the samples and none of them actually demonstrate the use of two receivers in parallel.
Do you spot something wrong in the code I posted ?
Would you please be kind enough to post here an extract of your code demonstrating how you use two DFR0094 receivers in parallel ?
thanks
alexisdal
Wendy.Hu wrote:Hi leff
Its great, the new library is ok . I get IR codes from two DFR0094 modules at the same Aduino board.
I feel like an idiot. there must be something obvious that i do not get. I have checked all the samples and none of them actually demonstrate the use of two receivers in parallel.
Do you spot something wrong in the code I posted ?
Would you please be kind enough to post here an extract of your code demonstrating how you use two DFR0094 receivers in parallel ?
thanks

2016-05-13 17:40:56
I feel like an idiot. there must be something obvious that i do not get. I have checked all the samples and none of them actually demonstrate the use of two receivers in parallel.
Do you spot something wrong in the code I posted ?
Would you please be kind enough to post here an extract of your code demonstrating how you use two DFR0094 receivers in parallel ?
thanks
alexisdal
Wendy.Hu wrote:Hi leff
Its great, the new library is ok . I get IR codes from two DFR0094 modules at the same Aduino board.
I feel like an idiot. there must be something obvious that i do not get. I have checked all the samples and none of them actually demonstrate the use of two receivers in parallel.
Do you spot something wrong in the code I posted ?
Would you please be kind enough to post here an extract of your code demonstrating how you use two DFR0094 receivers in parallel ?
thanks

2016-05-13 17:37:34 Hi leff,
I have installed the zip you put in your post. the lib has upgraded, i can see that the code has changed and there are much more samples now. it is a very complete lib.
The behavior I observe now has changed :
Because my new DFR0094 have not arrived yet, I am using the only one module i have simply by manually changing the data pin between 10 and 11 while observing the serial output as i send IR commands with a remote control. (with the previous lib I had no output at all when activating the second receiver in the code)
Now i see IR code when i plug the DFR0094 data in in 11 pin but nothing when i plug it on pin 10. It seems the
IRrecv irrecv1(10);
IRrecv irrecv2(11);
use some kind of global variable that the second line simply overwrites (i have not reviewed the code of new lib yet).
I feel like i am missing something obvious. The module seems to work, however, I have seen a IRremoteInfo.ino in the new lib that seems to dump various debug info. Do you want me to post the output ?
thanks for your kind support
alexisdal
I have installed the zip you put in your post. the lib has upgraded, i can see that the code has changed and there are much more samples now. it is a very complete lib.
The behavior I observe now has changed :
Because my new DFR0094 have not arrived yet, I am using the only one module i have simply by manually changing the data pin between 10 and 11 while observing the serial output as i send IR commands with a remote control. (with the previous lib I had no output at all when activating the second receiver in the code)
Now i see IR code when i plug the DFR0094 data in in 11 pin but nothing when i plug it on pin 10. It seems the
IRrecv irrecv1(10);
IRrecv irrecv2(11);
use some kind of global variable that the second line simply overwrites (i have not reviewed the code of new lib yet).
I feel like i am missing something obvious. The module seems to work, however, I have seen a IRremoteInfo.ino in the new lib that seems to dump various debug info. Do you want me to post the output ?
thanks for your kind support

2016-05-13 17:37:34 Hi leff,
I have installed the zip you put in your post. the lib has upgraded, i can see that the code has changed and there are much more samples now. it is a very complete lib.
The behavior I observe now has changed :
Because my new DFR0094 have not arrived yet, I am using the only one module i have simply by manually changing the data pin between 10 and 11 while observing the serial output as i send IR commands with a remote control. (with the previous lib I had no output at all when activating the second receiver in the code)
Now i see IR code when i plug the DFR0094 data in in 11 pin but nothing when i plug it on pin 10. It seems the
IRrecv irrecv1(10);
IRrecv irrecv2(11);
use some kind of global variable that the second line simply overwrites (i have not reviewed the code of new lib yet).
I feel like i am missing something obvious. The module seems to work, however, I have seen a IRremoteInfo.ino in the new lib that seems to dump various debug info. Do you want me to post the output ?
thanks for your kind support
alexisdal
I have installed the zip you put in your post. the lib has upgraded, i can see that the code has changed and there are much more samples now. it is a very complete lib.
The behavior I observe now has changed :
Because my new DFR0094 have not arrived yet, I am using the only one module i have simply by manually changing the data pin between 10 and 11 while observing the serial output as i send IR commands with a remote control. (with the previous lib I had no output at all when activating the second receiver in the code)
Now i see IR code when i plug the DFR0094 data in in 11 pin but nothing when i plug it on pin 10. It seems the
IRrecv irrecv1(10);
IRrecv irrecv2(11);
use some kind of global variable that the second line simply overwrites (i have not reviewed the code of new lib yet).
I feel like i am missing something obvious. The module seems to work, however, I have seen a IRremoteInfo.ino in the new lib that seems to dump various debug info. Do you want me to post the output ?
thanks for your kind support

2016-05-13 17:09:32 I am using Arduino 1.6.9 on a win7 64 laptop. using an arduino uno rev3 (i am planning to use an arduino micro in the near future)
I am trying the updated lib and will report soon
alexisdal
I am trying the updated lib and will report soon

2016-05-13 17:09:32 I am using Arduino 1.6.9 on a win7 64 laptop. using an arduino uno rev3 (i am planning to use an arduino micro in the near future)
I am trying the updated lib and will report soon
alexisdal
I am trying the updated lib and will report soon

2016-05-13 16:41:16 Hi leff
Its great, the new library is ok . I get IR codes from two DFR0094 modules at the same Aduino board.
Wendy.Hu
Its great, the new library is ok . I get IR codes from two DFR0094 modules at the same Aduino board.

2016-05-13 16:41:16 Hi leff
Its great, the new library is ok . I get IR codes from two DFR0094 modules at the same Aduino board.
Wendy.Hu
Its great, the new library is ok . I get IR codes from two DFR0094 modules at the same Aduino board.

2016-05-13 12:33:49 Hi alexisdal,
Have you tried different IR libraries? And may I know what your Arduino IDE version is?
Maybe you could try this one (has been updated by Arduino 1.6.8 automatically). If not working, I could do a test on my side.
Leff
Have you tried different IR libraries? And may I know what your Arduino IDE version is?
Maybe you could try this one (has been updated by Arduino 1.6.8 automatically). If not working, I could do a test on my side.

2016-05-13 12:33:49 Hi alexisdal,
Have you tried different IR libraries? And may I know what your Arduino IDE version is?
Maybe you could try this one (has been updated by Arduino 1.6.8 automatically). If not working, I could do a test on my side.
Leff
Have you tried different IR libraries? And may I know what your Arduino IDE version is?
Maybe you could try this one (has been updated by Arduino 1.6.8 automatically). If not working, I could do a test on my side.

2016-05-12 23:33:14 mmmm...
i may have found a solution to alternatively only one DFR0094 module for a few seconds, then change source and read only from that one, etc...
But that workaround does not allow me to read from multiple DFR0094 modules at the same time (in parallel).
Is what i am trying to acheive even possible with DFR0094 and its lib i found on http://www.dfrobot.com/wiki/index.php/D ... DFR0094%29 ???
I am terrible with interrupts, sorry
alexisdal
i may have found a solution to alternatively only one DFR0094 module for a few seconds, then change source and read only from that one, etc...
But that workaround does not allow me to read from multiple DFR0094 modules at the same time (in parallel).
Is what i am trying to acheive even possible with DFR0094 and its lib i found on http://www.dfrobot.com/wiki/index.php/D ... DFR0094%29 ???
I am terrible with interrupts, sorry


2016-05-12 23:33:14 mmmm...
i may have found a solution to alternatively only one DFR0094 module for a few seconds, then change source and read only from that one, etc...
But that workaround does not allow me to read from multiple DFR0094 modules at the same time (in parallel).
Is what i am trying to acheive even possible with DFR0094 and its lib i found on http://www.dfrobot.com/wiki/index.php/D ... DFR0094%29 ???
I am terrible with interrupts, sorry
alexisdal
i may have found a solution to alternatively only one DFR0094 module for a few seconds, then change source and read only from that one, etc...
But that workaround does not allow me to read from multiple DFR0094 modules at the same time (in parallel).
Is what i am trying to acheive even possible with DFR0094 and its lib i found on http://www.dfrobot.com/wiki/index.php/D ... DFR0094%29 ???
I am terrible with interrupts, sorry


2016-05-12 22:56:05 Hello,
I am happy with the DFR0094 module so I have ordered a couple others because I need to read IR commands from several IR units and not just one.
While they are being delivered to me i am working on the code and i am faced with a wierd behavior. With a DFR0094 module connected to pin 10, I have issues with the following code
if i uncomment the line
IRrecv irrecv2(11);
Then i get no IR codes at all
what's wrong ?
I must be missing something obvious
what am i supposed to do read IR codes from several DFR0094 modules on the same arduino board ?
thanks
fourchette
alexisdal
I am happy with the DFR0094 module so I have ordered a couple others because I need to read IR commands from several IR units and not just one.
While they are being delivered to me i am working on the code and i am faced with a wierd behavior. With a DFR0094 module connected to pin 10, I have issues with the following code
Code: Select all
/*
* IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff
* http://arcfn.com
*/
#include <IRremote.h>
IRrecv irrecv1(10);
//IRrecv irrecv2(11); // just uncomment this line and no IR command are received at all ???
decode_results results;
void setup()
{
Serial.begin(115200);
irrecv1.enableIRIn(); // Start the receiver
//irrecv2.enableIRIn();
}
void loop() {
if (irrecv1.decode(&results)) {
Serial.println(results.value, HEX);
irrecv1.resume(); // Receive the next value
}
//if (irrecv2.decode(&results)) {
// Serial.println(results.value, HEX);
// irrecv2.resume();
//}
}
if i uncomment the line
IRrecv irrecv2(11);
Then i get no IR codes at all
what's wrong ?
I must be missing something obvious
what am i supposed to do read IR codes from several DFR0094 modules on the same arduino board ?
thanks
fourchette
