BOScmnds.txt 'BOS Commands overview - BOS chip firmware '----------------------------------------- 'On reset the pgm prints a msg:- ' "Bug Commander BC x.x - Milford Instruments",cr ' and waits for a serial ascii command, ready prompt is '>'. 'Control of the Behavioural Operating System BOS is by serial ' commands from another processor or a terminal. 'A command may be halted by:- ' raising the 'cmndhalt' pin until the 'busypin' goes low or ' by sending "H" continuously until ">" is received, ' It is not possible to interupt "h","V","v". 'dec arguments must be ended by CR or other non-numeric code ' 'Main Commands:- ' Can be used manually from a terminal. ' Commands ignored if cmndhalt pin is high or if no prompt. ' 'busypin' goes high as soon as the first byte of a command ' is received and should be ignored for further bytes of ' multibyte commands. 'single character:- ' F - Forward one step ' B - Backward one step ' R - Rightturn one step ' L - Leftturn one step ' H - Halt ' S - Sit ' U - Up ' M - step so feet are in Midposition ' N - goto Neutral position, current values held in EEPROM ' K - Kill servo power, ' jumper selectable to exclude gripper, ' power turned on by any movement command ' or by jumping to direct Control. ' Z - Zzzz all servos to sleep ' Q - Quick, legs move in Trapezoid path, ' smooth but can stub toes ' T - Tall, legs move in Rectangular path, ' leg up/down is vertical ' p - pickup Gripper by 1/16 range ' P - Pickup Gripper by 1/4 range ' d - down Gripper by 1/16 range ' D - Down Gripper by 1/4 range ' o - open Gripper by 1/16 range ' O - Open Gripper by 1/4 range ' c - close Gripper by 1/16 range ' C - Close Gripper by 1/4 range ' W - Wait until all servos finish moving, ' only useful after gripper commands ' and direct control ' V - Voice, beep 1KHz for 0.1sec, BOS deaf to HALT during this time, 'one argument:- defaults ' s - speed, update variable Sspeed 4 (0-15) ' r - rideheight update variable legdown 170 down from neutral (0-255) ' m - move update variable swing 40 +- about neutral (0-255) ' l - lift update variable lift 90 up from down position (0-255) ' updates to s,r,m,l are not remembered during power off ' h - halt for time, 1=0.1sec ' BOS deaf to HALT during this time, ' useful for direct control and voice etc ' w - wait until servo is finished moving ' only useful after gripper commands ' and direct control ' individual control of Legs or Body, used for Wave-Gait:- ' <0,1,2,3,4,5,6>, ' <0=body, 1-6=legs>, ' 1f => Leg 1 steps forwards ' 1m => Leg 1 steps to mid position ' 1b => Leg 1 steps backwards ' similarly for Legs 2,3,4,5,6 ' 0f => Body moves forwards, ie all Legs move backwards without steping ' 0m => Body moves to mid position, ie all Legs move to mid position without steping ' 0b => Body moves backwards, ie all Legs move forwards without steping 'two argument:- ' n - new neutral position ' servos 0 - 11, new values stored in BOS eeprom ' if servo >11 then return to main command prompt ' g - gripper lift and grip ' 0 => no change, 255 - relax servo ' (easy to type a 0 for no change ' or wait for 5sec timeout) ' v - voice, beep,Hz/10,ms/10 'Requests - one argument:- ' ?g - arm and grip positions -> ' ?s - Sspeed -> ' ?r - rideheight -> ' ?m - move -> ' ?l - lift -> ' ?n - neutral positions, ' get EEPROM data for neutral position ' for servos 0 - 11 -> ' ?v - BOS version -> 'Low level Direct Control '------------------------ '3 byte:- ' - direct control of servos ' not suitable for human use from terminal, ' byte values and 100ms timeout ' turns on servo power and exits with servo power on ' first byte - control byte (non printing) character (<6) ' second byte - $speed;$servo - high nibble and low nibble respectively ' third byte - argument ' X - any value - ignored ' commands:- ' 0,$speed;$servo,position ' 1,$X;$servo,X ->P return byte P is actual servo position ' 2,$X;$servo,X ->S return byte S is servo status, ' bit1 0=>servo off ' 1=>on, ie being pulsed ' bit0 0=moving to requested position ' 1=at requested position ' 3,X,X ->hiF,then loF two bytes all servo moved status ' bitX=servoX, 1=>finished ' bit15 is set to 1 ' so all finished=$FFFF ' 4,X,X ->hiR,then loR two bytes all servo on/off status ' bitX=servoX, 1=>being pulsed, ie on ' bit15 always 1 ' 5,$X;$servo,X stop pulsing servo 'The servos are refered to by their logical positions, ' '-------- Legs & Logical-Servos -------- ' ' Plan view of Hextor S - Servo(0 - 13) L - Legs(1 - 6) ' S L L S ' ( ) gripper 13 ' | | lift 12 ' L---F---R LEG NUMBERS ' 1,0 | 1 2 | 6,7 1=LF 2=RF ,L - left, R - Right ' 3,2 | 3 4 | 8,9 3=LM 4=RM ,M - mid, F - Front ' 5,4 | 5 6 | 10,11 5=LB 6=RB ,B - Back ' \-------/ ' '-------- Servo values and leg positions ------- ' f - forward m - middle b - backward 'Left Lf=255 Lm=127 Lb=0 'Right Rf=0 Rm=127 Rb=255 ' ' d - Down u - Up 'Left Ld=0 Lu=255 'Right Rd=255 Ru=0 ' '-------- Arm and Gripper positions ------- 'Arm up 255 'Arm down 0 'Gripper open 255 'Gripper closed 0 '==============================================================