tips for patching - multiple receivers at once to determine direction #2166
Replies: 1 comment 1 reply
-
Don't. I've tried multiple times. It hasn't ended well. If you do want to tackle it, fork the library because it will require a lot of changes that really are not that useful to others and will take up too much space (code & memory) if it was to be merged into the library as a whole. To do it, you will need to duplicate the buffer & state-machine variable where the raw data is collected. i.e. You can't have two different readers writing to the same buffer. Then you will have to change each interrupt handler to write to their respective buffers. Then you will need two different timers to mark the state-machine/buffers as finished capturing etc. Or, Hence this is a hack. It kind of works to let you know if the message came on, say the "left" demodulator, or the "right" demodulator, if & only if, both can't see the same signal at the same time. It should work most of the time, but if there is an overlapping message being received at the same time which is very rare typically, if isolated and the environment is not noisy) In short, there isn't a good solution. Heck .. use two ESP (They are only $5 after all) and use timestamps from them for the message and to determine what they saw etc. |
Beta Was this translation helpful? Give feedback.
-
It is my understanding that this library kind of supports multiple receivers on different pins, but not listening to multiple at once cause they all share the same interrupt routine.
However, I want to use two receivers to left and right and with a baffle in between them, to determine what direction the signal came from. The idea is, if only one receiver receives a signal, it came from that direction, but if both receive the signal simultaneously then it came from the front.
I can not just repeatedly switch back and forth between polling the two receivers, since the tasks that must be run alongside this loop take an unpredictable amount of time, and I already have bluetooth etc. tasks occupying the other core. So I need to set it to interrupt when either of the two receivers gets something.
Do you have any tips on where I should start to make those modifications?
Beta Was this translation helpful? Give feedback.
All reactions