Two way IRIN?

WhiteSpace

Well-known member
Happy New Year all (I think it’s still just about OK to say that mid-Jan). Is it possible to have two-way IRIN/IROUT? So Picaxes A and B at opposite ends of a room. A can send to B and B send to A. Presumably there is a risk that even if you shield the IR LEDs so that the A transmitter and A receiver don’t have a clear line of sight, A would read transmissions sent by A and bounced back from walls etc. If I understand correctly, a Picaxe must be identified as device ”1” so it’s not possible to allocate different IDs to A and B. Is it a question of setting an initial byte in the transmission like a qualifier in serial, that only the other Picaxe will act on? Or is it as simple as the Picaxe not receiving while it‘s transmitting? I’ll play around a little and try these, but just wondered if I’m reinventing the wheel. Thanks.
 

westaust55

Moderator
The concept will definitely work.
I did some Infra-red based experiments around 10 years ago with PICAXE A sending a message to B and B responding with the temperature back to A.
As I recall distances of at least 7 metres and maybe 10 metres were achieved indoors.
Will later see if I can find my code but could have been using other commands than IRiN and IROUT.
 

PhilHornby

Senior Member
If I understand correctly, a Picaxe must be identified as device ”1” so it’s not possible to allocate different IDs to A and B.
Or is it as simple as the Picaxe not receiving while it‘s transmitting?
There's no background IR receive function - so a transmitting Picaxe won't see its own output. However, if you wanted some more flexibility (or even just to avoid using Sony codes), see these two threads (NEC based):-

Background Infrared Receiver for 32-bit Codes | PICAXE Forum

and

NEC format bit-banged IR output using Macros and Include files. | PICAXE Forum
 
Top