I am currently working on a school project and I need some help.
In this project I need to recieve through 4 IR recievers (from multiple pins) and send through 1 emitter.
I have found that in the latest version of the IRRemote library the send/recieve at the same time is implemented. Github link of the library :
I have also found an older version of the same library that was modified to support multiple recievers. link :
I was wondering if someone knows of some library that allows both options.
I am not familiar with the libraries but let me give you a SWAG hint: There are the 2 external interrupts (INT0, INT1) plus three sets of 8 pin change interrupts. If it were me i would use the edge interrupt, then in the interrupt routine set a flag for the appropriate interrupt and get out. You do not want to spend any more time in an interrupt service routine (ISR) then is needed. Then in your main loop you can process the appropriate interrupt(s) in round robin fashion.
Check in the library you decide on, it may dictate how you must do this. Some may come with examples and it will do most of the work for you. The worse thing you can do is delay().
Thanks for the reply !
My project basically consists of a networks of cubes that send/receive IR signals from each face. Since the cube has to recognise on which face the signal is coming I have to know which sensor recieved the signal. Adding them together wont allow me to know which face received the signal.
You can or them together with shottky diodes and connect to IR_RECEIVE_PIN. And in the ISR (TIMER_INTR_NAME) (line 1338 ff. in IRReceive.hpp after the line 1375 // Initialize all state machine variables
you check which of the four inputs (before the or) is low.