Remote control ID with irin and irout

tki1i19

New Member
Hi all,

has somebody try the irin and irout command but including the ID command? I have try the irin and irout command and is working, but worried about the interference another remotes. i need that to make a robot controller, one remote for one robot. So i need a ID to make sure is NO interference one remote to the other. It's possible? Because i see at irout command is already Device ID (0-31), but i am not see this function at irin. Or maybe any another suggestion to make it possible? thanks
 

MPep

Senior Member
Welcome to the Forum.

Please tell us:
1- PICAXE chip you are using;
2- The program you are trying to use. Please enclose your code within the [CODE]and [/CODE] tags

MPep
 

tki1i19

New Member
Hi MPep,

I am use PIC18F4520 as receiver of remote, and this the code
Code:
#picaxe 40x2
#no_data
#terminal 4800
main:

irin [1000,main],b.3,b0 ;wait for new signal
;debug b0
sertxd ("Nilai: ",#b0,13,10)

goto main
And for transmiter, i am use PIC18F45K22, here the code:
Code:
#picaxe 40x2
#no_data
;#terminal 4800
main:

for b1 = 0 to 21
irout b.0,1,b1
pause 500
next b1

goto main
is working, but when i change the irout command to be:
Code:
irout b.0,2,b1
is not working. So how to change the ID at irin command? I want use the device ID as remote ID number. is possible?
 

hippy

Ex-Staff (retired)
It's possible? Because i see at irout command is already Device ID (0-31), but i am not see this function at irin.
While IROUT can specify the Device ID to send to, IRIN can only receive data sent to Device ID 1.

Or maybe any another suggestion to make it possible? thanks
A PICAXE could bit-bang an IRIN equivalent which does detect the Device ID the command was sent to and discard any not directed to itself.

Alternatively, the action and who it is sent to could be encoded into the command value sent by an IROUT command and the value received by IRIN split back into action and who it is directed at and discard that way. There would be limited capabilities though with only 7 bits of command; eg 4 devices, 32 actions / 7 devices, 16 actions etc.
 

tki1i19

New Member
hi hippy,

thanks for your reply.

correct me if i am false. you mean the remote is send only 7 bit, so i can use 3 bit as ID (the device is 0-7) and for command is 4 bit (if the command i make a combination will be 16 actions/command), correct?
Could i get more then 4 bit command? this will be use for forward, backward, left and right. I don't have another command more for other function. For ID is enough when use 3 bit (1 team is 4 people)
 

hippy

Ex-Staff (retired)
That is correct, the command sent is 7 bits so you can split that any way you wish to identify the robot and the action required -

1+6 = 2 robots, 64 actions
2+5 = 4 robots, 32 actions
3+4 = 8 robots, 16 actions
4+3 = 16 robots, 8 actions
5+2 = 32 robots, 4 actions
6+1 = 64 robots, 2 actions

You could also use multiple IROUT command sequences to indicate which robot and which action; for example sending 0-63 can identify one of 64 robots ( or any combination of 6 robots ), 64-127 can identify one of 64 actions sent to that robot.

That can be slightly more complicated to implement though.
 
Top