'>Hxtr3-1.BSx '============================================================== 'Milford Instruments http://www.milinst.com 'Hextor Design, Bug Commander - Behavioural Operating System 'and the Behavioural Controller programs by David Buckley '================================================================ '{$stamp BS2Sx} DEBUG "prog1" '============================================================== 'Hxtr3-0.BSx - Main 'Hxtr3-1.BSx - Activity sequencer 'Hxtr3-2.BSx - US Behaviour 'Hxtr3-3.BSx - Direct Control 'Hxtr3-4.BSx - Prog4 'Hxtr3-5.BSx - Prog5 'Hxtr3-6.BSx - LCD menu 'Hxtr3-7.BSx - Utils- LCD control and IR remote 'Hxtr3-Doc.BSx - Meta Commands and Program Headers '============================================================== ' 'New '--- 'flags moved from CommonRAM9 to CommonRAM10 ' 'CommonRam: 'Meta command: 'Constants: 'Variables: 'Routine: 'Sequences: '============================================================== 'History '------- '30Apr06 checkstack: added after doneA: and used in init: instead of doneA, reads better '12Sep05 S for sequence changed to A for Activity in all names '15Aug05 read_arg which reads word Arg also named read_2args reads Arg1,Arg2 '============================================================== 'Direct Control 'turns on servo power and exits with servo power on 'BOSbusy goes low immediately, doesn't wait for move to finish '$speed;$servo - high nibble and low nibble respectively ' BOScmnd,arg1.arg2 ' 0,$speed;$servo,position ' 1,$XX,$servo,X ->P actual servo position ' 2,$XX,$servo,X ->S servo status, bit1-on bit0-done ' 3,X,X ->hiF,then loF two bytes all servo moved status ' 4,X,X ->hiR,then loR two bytes all servo on/off status ' 5,$XX;$servo,X stop pulsing servo ' '-------- 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 '-------------------------------------------------------------- 'Sequences in DATA statments '--------------------------- 'Meta commands - '"z" terminator for sequences '"J",,