I'm using SimpleReceiver.ino to receive and decode IR signals from ir-remote-send.ino. SimpleReceiver board is Uno R3 and sensor is TSOP 4838. Works WELL!
But, I would like to use two or more receivers so as to eliminate "dark" spots where no IR reception occurs.
PinDefinitionAndMore.h defines pin 2 for the Uno as the default receiver input. How can I modify PinDefinitionAndMore.h to implement multiple IR receivers on the same platform?
Thanks,
Mark
@moorem34 Perhaps if you provided links to the code someone could have a look.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
Perhaps you might also consider what might happen if more than one receiver is activated simultaneously.
Anything seems possible when you don't know what you're talking about.
But, I would like to use two or more receivers so as to eliminate "dark" spots where no IR reception occurs.
Kind of unclear what mean without showing your setup.
Is it possible to OR the ir detectors together?
Maybe use an address driven selector to read each IR detector in turn for a valid value.
If for example you have 4 detectors you could address each one in turn using two output pins.
pseudo code
Set Address 00 // on say pin3 and pin4)
value = Read(pin2) // using your library thingy
if Valid(value) then result = value
Set Address 10
value = Read(pin2)
if Valid(value) result = value
Set Address 01
value = Read(pin2)
if Valid(value) then result = value
Set Address 11
value = Read(pin2)
if Valid(value) then result = value
Yes of course. My apologies...here's the link. I got the library from this (Dronebot Workshop) site when Bill did the recent IR Remote Control projects in the workshop but this is the reference from github that Bill has in the comments sections at the front of the sketch. Install IRremote library, go to examples from custom libraries, IRremote, SimpleReceiver.
@moorem34 When you ask the following question
How can I modify PinDefinitionAndMore.h to implement multiple IR receivers on the same platform?
Are you looking for an answer along the lines of
1. Open your editor
2. Load in the file PinDefinitionsAndMore.h
3. Add an extra line for the pin of the 2nd reciever
4. Save and exit
Or are you really asking a different question?
BTW, how many hours of programming experience do you have?
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander Thank you! YES! I'm trying to implement a second receiver. I have no idea what the attached files does or how it works.
I'm a retired controls engineer. LOTS of plc, hmi, servo....etc programming. BUT, this environment is new to me. I love this stuff and want to continue to work "hands on" to stay sharp, release some creative juices....and stay out of the bar!!
@moorem34 Attached file?????
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@moorem34 I just had a quick look at the receive code. Change ALL mentions of IrReceiver to
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander sorry...I thought I'd attached a link to github for the library the receiver file is in. You found it though! OK...let me get caught up. I've added IR_Receiver2 to the definitions file and am working on the code now. I'll report back in after I get the hardware up and running. Thanks for your help
@moorem34 No problem. I was actually pleasantly surprised it appeared so easy.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@zander Good NEWS!
I took your advice and segregated the code as you outlined into setupreceiver1/2 and processreceiver1/2. I then called the setup subs from the setup function and then each of the process subs from the main loop.
I've not had a data fault yet that I'm aware of. And, occasionally both receivers report the same data on a single button push.
I've attempted to verify operation by commenting out one receiver, thereby disabling that hardware. I get good data on the other one. Just to be sure, I then reenabled the first receiver and disabled the second...again good data.
I'm quite pleased. thanks for your help.
@moorem34 That's great news.
First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, 360, fairly knowledge in PC plus numerous MPU's & MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.
@moorem34 Hello, unrelated to this thread but a quick question for you: did you make any progress with your mower blade balancer idea from some months back?