by inaki » Mon Aug 21, 2006 3:46 pm
by inaki
Mon Aug 21, 2006 3:46 pm
I have made a remote controller for the Bioloid using a SX28 micro and following the encoding that I explain in my other thread 'IR Codes: can you decipher this?'.
I have used exactly a 40Khz carrier and 800us pulses.
Then I use a simple BCP program that reads continuously the 'RX remocon data' register:
START
Loop:
LOAD CM5.PRINTLF, AX.100.RX_REMOCON
DELAY 10
JUMP Loop
END
What I have found is that this register, the so called 'RX remocon data', rembers forever the last read data. I mean, if you send the data 85 from a remote controller it remembers this data. So anytime you read it thereafter you will read 85, no matter the sender has stopped sending data, and so until a different data is sent to the sensor.
This is not the behaviour I expected. I thought it would erase the incoming data once it is read but it does not. (Have I missed something about this register?)
There is another register called the 'IR incoming data' but I have not found its meaning. It reads zero when there is no data available and 2 when there is an available data.
So the solution I have found to send distinctive data to AXS1 is by sending pairs of data with a slight delay, with the following scheme:
'Codes sent from my Remote Controller:
Send MyData
Delay X
Send Zero
So, when the AXS1 reads IR data it will read MyData for a short time but will read zero thereafter.
I am thinking here about the following scenario:
You want to manage your robot so it moves right for example when receiving data A and moving left when it receives data B. Simply sending A would move the robot to the right forever until another command is sent. The zero after the A command would prevent this.
I don't say the 'RX remocon' behavior is wrong in all cases. It is simply not the best approach for most cases.
Anyway this experiment proves my analysis of the IR codes works. So it is possible (and pretty easy) to make an IR remote controller for our Bioloid robots.
I have made a remote controller for the Bioloid using a SX28 micro and following the encoding that I explain in my other thread 'IR Codes: can you decipher this?'.
I have used exactly a 40Khz carrier and 800us pulses.
Then I use a simple BCP program that reads continuously the 'RX remocon data' register:
START
Loop:
LOAD CM5.PRINTLF, AX.100.RX_REMOCON
DELAY 10
JUMP Loop
END
What I have found is that this register, the so called 'RX remocon data', rembers forever the last read data. I mean, if you send the data 85 from a remote controller it remembers this data. So anytime you read it thereafter you will read 85, no matter the sender has stopped sending data, and so until a different data is sent to the sensor.
This is not the behaviour I expected. I thought it would erase the incoming data once it is read but it does not. (Have I missed something about this register?)
There is another register called the 'IR incoming data' but I have not found its meaning. It reads zero when there is no data available and 2 when there is an available data.
So the solution I have found to send distinctive data to AXS1 is by sending pairs of data with a slight delay, with the following scheme:
'Codes sent from my Remote Controller:
Send MyData
Delay X
Send Zero
So, when the AXS1 reads IR data it will read MyData for a short time but will read zero thereafter.
I am thinking here about the following scenario:
You want to manage your robot so it moves right for example when receiving data A and moving left when it receives data B. Simply sending A would move the robot to the right forever until another command is sent. The zero after the A command would prevent this.
I don't say the 'RX remocon' behavior is wrong in all cases. It is simply not the best approach for most cases.
Anyway this experiment proves my analysis of the IR codes works. So it is possible (and pretty easy) to make an IR remote controller for our Bioloid robots.