|
But why not take a 'Chance' and get to know what Binary really is, well not really, but an understanding of it... got 0-1 minute ?? ;-)
This is a list of IR Commands referenced to the RoboSapien manual. Values are in Hex and (Decimal) format. For a complete list of standard and secret commands as well as detailed IR timing information, check this site: http://www.aibohack.com/robosap/ir_codes.htm I have modified this list to display the Binary Value of each command for people who use Robodyssy, or my Program, as well as give you an understanding of what is actually going on
Red Commands: ============= (Page P.7) 81 (129) - Right Arm Up 10000001 84 (132) - Right Arm Down 10000100 85 (133) - Right Arm In 10000101 82 (130) - Right Arm Out 10000010 83 (131) - Tilt Body Right 10000011
89 (137) - Left Arm Up 10001001 8C (140) - Left Arm down 10001100 8D (141) - Left Arm In 10001101 8A (138) - Left Arm Out 10001010 8B (139) - Tilt Body Left 10001011
(Page P.8) 80 (128) - Turn Right 10000000 88 (136) - Turn Left 10001000 86 (134) - Walk Forward 10000110 87 (135) - Walk Backward 10000111 8E (142) - Stop 10001110
92 (146) - Right Sensor Program 10010010 94 (148) - Sonic Sensor Program 10010100 93 (147) - Left Sensor Program 10010011 90 (144) - Master Command Program 10010000 91 (145) - Program Play 10010001
Green Commands: =============== (Page P.9) A1 (161) - Right Hand Thump 10100001 A4 (164) - Right Hand Pickup 10100100 A5 (165) - Lean Backward '10100101 A2 (162) - Right Hand Throw 10100010 A3 (163) - Sleep 10100011
A9 (169) - Left Hand Thump 10100001 AC (172) - Left Hand Pickup 10101100 AD (173) - Lean Forward 10101101 AA (170) - Left Hand Throw 10101010 AB (171) - Listen 10101011
A0 (160) - Right Turn Step 10100000 A8 (168) - Left Turn Step 10101000 A6 (166) - Forward Step 10100110 A7 (167) - Backward Step 10100111 AE (174) - RESET 10101110
B2 (178) - Right Sensor Program Execute 10110010 B4 (180) - Sonic Sensor Program Execute 10110100 B3 (179) - Left Sensor Program Execute 10110011 B0 (176) - Master Command Program Execute 10110000
B1 (177) - Wake Up 10110001
Orange Commands: ================ (Page P.11) C1 (193) - Right Hand Sweep 11000001 C4 (196) - High 511000100 C5 (197) - Right Hand Strike 1 11000101 C2 (194) - Burp11000010 C3 (195) - Right Hand Strike 2 11000011
C9 (201) - Left Hand Sweep1 1001001 CC (204) - Talk Back11001100 CD (205) - Left Hand Strike 1 11001101 CA (202) - Whistle11001010 CB (203) - Left Hand Strike 2 11001011
(Page P.12) C0 (192) - Right Hand Strike 3 11000000 C8 (200) - Left Hand Strike 3 11001000 C6 (198) - Bulldozer 11000110 C7 (199) - Opps! 11000111 CE (206) - Roar 11001110
D2 (210) - Demo 111010010 D4 (212) - Dance 11010100 D3 (211) - Demo 211010011 D0 (208) - All Demo 11010000 D1 (209) - Power Off 11010001
NOTES: add $08 to go from right-side commands to left-side commands. add $20 to command bytes for the GREEN shift (ie. $Ax and $Bx range) add $40 to command bytes for the ORANGE shift (ie. $Cx and $Dx range)
-----------------=============================-------------- Example #1
Sub Roar()'Roar '11001110 (name, command, binary) CE (206) - Roar 11001110 (hex, decimal, Command, binary)
Sub LHandSk1()'Left Hand Strike 1 '11001101 (name, command, binary) CD (205) - Left Hand Strike 1 11001101 (hex, decimal, Command, binary)
-----------------=============================-------------- Example #2
Tutorial on Binary: thought it might be good sure helped me ;-)
Humans have ten fingers, and so it's not so surprising that many cultures throughout history have used base 10. Digital computers use base 2 or binary number representation, each digit of which is known as a bit (binary dig it). Here, each bit is represented as a voltage that is either "high" or "low," thereby representing "1" or "0", respectively. To represent signed values, we tack on a special bit -- the sign bit -- to express the sign. The binary addition and multiplication tables are
0 + 0 = 0 1 + 1 = 10 0 + 1 = 1 1 + 0 = 1 0 + 0 = 0 0 + 1 = 0 1 + 1 = 1 1 + 0 = 0
(1) A carry means that a computation performed at a given position affects other positions as well. Here, 1+1=10 is an example of a computation that involves a carry. Note that if carries are ignored, subtraction of two single-digit binary numbers yields the same bit as addition. Computers use high and low voltage values to express a bit, and an array of such voltages express numbers akin to positional notation. Logic circuits perform arithmetic operations.
ok so were going to find out where each binary bit is placed on the BX-24 basic X coding....
AC (172) - Left Hand Pickup 10101100 (hex, decimal, Command, binary)
it is really simple to sort out 1 being highbit, and 0 being the lowbit the coding is simple on the BX- as a simple 1 is represent by a "HighBit" name ....
Call Pulseout(Sapien,HighBit,1) 'This equals 1 Binary Call Pulseout(Sapien,Clockbit,0)
The 0 is represented by
Call Pulseout(Sapien,LowBit,1) 'This Equals 0 Binary Call Pulseout(Sapien,Clockbit,0)
-------------------------------============================================------------- REFER TO THIS EXAMPLE TO SEE HOW EACH BINARY BIT IS PLACED
Sub LHandPick()'Left Hand PickUp '10101100 would be displayed something like this on the chip
Call Pulseout(Sapien,startbit,0) ' bit to start sending commands
Call Pulseout(Sapien,HighBit,1) '7 bit 1 Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '6 bit 0 Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '5 bit 1 Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '4 bit 0 Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '3 bit 1 Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '2 bit 1 Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '1 bit 0 Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '0 bit 0 Call Pulseout(Sapien,Clockbit,0) --------------------------------------------------=======================
Definition of these Values..... and how they add up to one full command (walk forward)
This code listed below is inserted at the beginning of your project so each bit of binary can be properly converted and used to move your Robosapien robot.
Public Const StartBit as single = 0.006664 'Time it takes for the start bit to start a command
Public Const LowBit as single = 0.000833 'Time it takes for the low bit = 0 Public Const HighBit as single = 0.003332 'Time it takes for the highbit = 1
Public Const ClockBit as single = 0.000833 'Clock bit time ' second # in the 1binary bit code = 0
you place a start bit at the beggining of each command you are going to create.. so you would do this by
Call Pulseout(Sapien,startbit,0) ' bit to start sending commands
now we have to call the HIGH/LOW and Clock Bit for each bit of Binary we have to deal with. We have 8 peices of Binary, which means that we will basically have 8 questions, with an a) an b) value making the final value for that bit of Binary ....
This is a very easy thing to do, as we can sort out 1 or 0 for each 8 of the Binary values by seing if it has a HighBit or a LowBit Value in it....
Call Pulseout(Sapien,HighBit,1) = 1 binary bit
Call Pulseout(Sapien,LowBit,1) = 0 binary bit
followed by the next command which gives a 0 binary bit to the ClockBit Value...
Call Pulseout(Sapien,Clockbit,0)
Full code would look like this
Call Pulseout(Sapien,HighBit,1) '7 bit Call Pulseout(Sapien,Clockbit,0)
and once calculated using this little chart below or binary tutorial above we will get 1 full binary bit Value to the 8 Bit Value that is needed to do a command on Robosapien
0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 0 + 0 = 0 0 + 1 = 0 1 + 1 = 1 1 + 0 = 0
so that example above:
Call Pulseout(Sapien,HighBit,1) '7 bit Call Pulseout(Sapien,Clockbit,0)
Would be a Binary value of 1
***********TEST***************** ----------------------------------------------------------- TEST YOUR SKILLS ----------------==========
(QUESTION A) HOW MANY 1 ARE IN THIS BINARY DATA?
Sub LHandSk1()'Left Hand Strike 1
Call Pulseout(Sapien,HighBit,1) '7 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '6 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '5 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '4 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '3 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '2 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '1 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '0 bit Call Pulseout(Sapien,Clockbit,0)
(QUESTION B) what is the Binary value of this Command
Call Pulseout(Sapien,HighBit,1) '7 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '6 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '5 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '4 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '3 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '2 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '1 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '0 bit Call Pulseout(Sapien,Clockbit,0)
(QUESTION 3 ) what is the BINARY READING for this Value?
Call Pulseout(Sapien,HighBit,1) '7 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '6 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '5 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '4 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,LowBit,1) '3 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '2 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '1 bit Call Pulseout(Sapien,Clockbit,0)
Call Pulseout(Sapien,HighBit,1) '0 bit Call Pulseout(Sapien,Clockbit,0)
[b]
**************ANSWERS AT BOTTOM OF DOCUMENT*******************
|