@05Sep22 Commands ======== Note - ","comma and " "space ignored, "'" start/end of comment ":"colon precedes autoload slot address in loaded slots [Esc].()<>$\/^?' ABEFHLMPQRSTVXZ abiklrstuvwxyz [Esc],[Q],[.],[IR-Power] - quit current operation - recording, playing, input, autoAct if [IR-Power],[Q],[Esc] then flush Serial Buffer ; - Play continues in the next 32 byte slot ( - start of a Do, a jump to an Act will on . continue in the Do, will show its location in EEPROM when played. If a jump is made to an Act which contains another Do then that Do will not be implemented. ) - end of a Do 1-8 Act etc to Record or Play (Slot 0 - 7) in current page S - Standup F - step Forwards B - step Backwards R - step Right L - step Left < - jump Left > - jump Right H - Halt - stand with feet together E - Execute - RUN 2 - user code Z - Sleep t - Turn ta - turn Away from leading foot, will be used in avoid Acts tt - Turn Towards leading foot (if Backwards this is still the forward foot) tm - turn Memory (same way as last turn, will be used in avoid Acts to - turn Other way from last time, will be used in avoid Acts tr - turn Right with feet side by side, no pace tl - turn Left with feet side by side, no pace tb - test eyes and step to L or R depending on which is brightes by 10% td - test eyes and step to L or R depending on which is darkest by 10% t@b - Turn to bright until L R the same within 10% t@d - Turn to dark until L R the same within 10% v<1-6,b,e,o,t> - voices 0,t - tsh 1,b - bip 2,v - beep50 3,s - sshhh 4,e - whee 5,o - whoa 6,T - tune 0 - random 1-9 tune T1:'TwilightZone T2:'Thunderbirds_Theme T3:'Terminator_Theme T4:'Adams_Family T5:'StarWars T6:'Mission T7:'Knightride T8:'james_bond T9:'entertainer z - Sleep s stop no pulse s - speed x [1-9] + - speed up +1 MAX speedmax - - speed down /2 MIN 1 m - set speedmax for s+ w0 - wait until serial or IR command for Act to resume, no effect if not playing w - wait x/2 seconds a,^ - do action, subroutine, ^ on IR-remote 1 - bip 2 - whee 3 - whoa 4,r - RockRock 5,> - JumpR 6,< - JumpL 7,b - Bow 8,g - goof 9,t - tiptoe p - please s - StandUp u - getup f - getup from front b - getup from back $U - READ Ultrasonic sensor AND react TO objectRange using React to Ping behaviour rules $u - READ Ultrasonic sensor $W - READ Whisker sensors AND avoid obstacles (if any) using React to Whiskers behaviour rules $G - READ Beard sensors AND avoid holes (if any) using React to GWhiskers behaviour rules \,k - control 'can't print "\" gives syntax error W,G - Whisker LEDs, Gwhisker LEDs 0=%00 - off 1=%01 - Left off, Right on 2=%10 - Left on, Right off 3=%11 - Left on, Right on L - Left on R - Right on 0-7 set bits of portB high or low 1,h - set high 0,l - set low % - set portB to binary, if less than 8 digits follow by space or comma needs \0 - \7 first to set direction to output y<1-9> - yawn, yawn increments each pass until >parameter then reset yawn and skip next character. I.e. FOR yawn=0 TO parameter DO (...) i - If, if true do (cmnds), only in Play mode, can't be recorded only loaded, '(' ignored iU(cmnds) - if Ultrasonic distance < value(0-9) then do (cmnds) ir<0-9>(cmnds) - if random(0-9) > value(0-9) then do (cmnds) r<1-8> - record slot in current page 1 of 80 32byte Acts/Reactions/Poses/Behaviours/Notes end with "." or ";" for Play to continue in the next 32 byte slot 'comments' are ignored and not recorded BEHAVES b<0-9,S,D,I,r,s,d,R,U,p,l,t,h,a,q> 'B<1-8> load behavior <1-8> from internal EEPROM - as Bamduino <0-9><1-8> - run commands and return S - Save current behaviour to internal EEPROM D - reInitialise behaviour from Default in internal EEPROM I - Initialise internal EEPROM d<0-8> - do set RAMautoAct, 0=>noautoAct da - do autorun RAMautoAct if Ccmnd="." dq - autorun off R<0-9> - set current Reactions Page u<01> - set auto-getup 1=on U<+-> - set manually by IR/Kbd, set U far(+) or U near(-), units 50mm U<+-><0-9> - set U far(+) or U near(-), units 50mm U<0,1> - disable or enable react to US p<0-9> - move pace x l<0-9> - move lift x t<0-9> - move turn x h+<0-9> - Hip, toes offset move out (10us degrees) h-<0-9> - Hip, toes offset move in MAX 5 (10us degrees) a+<0-9> - Ankle, foot outside down (10us degrees) a-<0-9> - Ankle, foot outside up (10us degrees) v<0-9> - Vitality v+ - inc vitality MAX 9 v- - dec vitality MIN 0 v/ - vitality /2 MIN 1 vm - set vitalitymax =Vitality for v+ b - bip when reading serial commands q - quiet, no bip W<0-9> - Whisker threshold G<0-9> - Ground Feeler threshold @ - setup Pose - adjust joints / - next * - print -,+ - adjust P<0-9><1-8> - save Pose to Pose PosePge,Slot,type s,j,# C - Saves LHC LAC RHC RAC as current position, HOO and AOD to 0 9 - feet@90deg n - @neutral, rL, rR, rm, rM - roll left and right for walking, m ankles at min, M ankles at max pL ,pR, pm, pM - pace left and right for walking, m hips at min, M hips at max Q,[Esc] - Quit SYSTEM - Acts,Tasks,Minds,behaviours, Sounds and Poses are lists of commands stored in EEPROM r<1-8> - record slot in current page 1 of 80 32byte Acts/Reactions/Poses/Behaviours/Notes end with "." or ";" for Play to continue in the next 32 byte slot 'comments' are ignored and not recorded !<0-9><1-8> - execute ReAct in and as subroutine A<0-9><1-8> - execute Act in and as subroutine T<0-9><1-8> - execute Task in and as subroutine M<0-9><1-8> - execute Mind in and as subroutine b<0-9><1-8> - run Behaviour commands in and return (lc b because of Back) V<0-9><1-8> - execute Sound in and as subroutine Sounds are lists as for the Basic 'sound' command P<0-9><1-8> - execute Pose in and as subroutine Poses have several types Individual Pose cmnds- 1- Pulse servo - servo number, 1=on 0=off - eg 20, 31. (LH=3 LA=2 rRH=1 RA=0) Individual Pose cmnds - scaled by vitality 2- Offset from joint mid in joint travel units 0-9 L,R,Hip,Ankle,Up,Down,In.Out,amount 0-9, LHOx,LHIx,LAUx,LADx,RHOx,RHIx,RAUx,RADx eg RHU4 3- Offset from current position in 10us units servo number 0-3, +- direction, offset(0-9) (LH=3 LA=2 rRH=1 RA=0) eg 3-5, 1+9, 2-4, 0-8 Quad Pose cmnds in 10us units - must be in this order LH LA RH RA For #js types If value 0 or omitted then ignored eg #123 #0 #0 #34 then LA RH not altered. Only leading type char read, rest are used as separators and can be commas or space eg s104,56,0 93 4- #LHip,#LAnkle,#RHip,#RAnkle - logical with logical mid 150 eg #124 #97 #193 #56. 5- jLHip jLAnkle jRHip jRAnkle - logical joint values eg j124 j97 j193 j56 6- sLHip sLAnkle sRHip sRAnkle - servo values eg s124 s97 s193 s56. p - inline pose end with ")", run prog1 InlinePose, ( optional p#102 #43 #200 #74), p(3+2 1-6), p(:P32 'comment' LAI7 RHO3) SYSTEM l<1-8> - load slot x in current page p - load all current page l: - autoload a slot, slot address may be inside a comment ie l:'any comment':. eg l:'slot1:T21'Fvv. l::T22'slot2'FFvv. l:':T23slot3'FFFvv. l:'slot4':T24 FFFFvv. l::T25FFFFFvv. l:FFFFFvv:T26. l:FFFFFvv:T27FBRL. lH<0-9> - load Help page - end file with EOF=255 /<0-9> - set Page /A - set Chapter to Acts /P - set Chapter to Poses - comma and space separators allowed /B - set Chapter to Behaviours /R,/! - if in ReActs set ReActions to current RePage /R,/! - set Chapter to ReActs slot 1 'U+' 'if object within range 2 'U-' 'if object too near 3 'W-R' 'if object on Right 4 'WL-' 'if object on Left 5 'WLR' 'if objects on Left and Right 6 'G-R' 'if hole on Right 7 'GL-' 'if hole on Left 8 'GLR' 'if holes on Left and Right /V - set Chapter to Voice - format as sound command /T - set Chapter to Tasks /M - set Chapter to Minds /N - set Chapter to User Notes ? - Query h - print help <1-8> - page, h - all b - print Behavior <1-8> - print Slot ? - Print all Slots in current Page /A /B/ /P /R /T /S /M /N p - Print all Slots in current Page /A /B/ /P /R /T /S /M /N P - print all pages in current Chapter /A /B/ /P /R /T /S /M /N d - Dump current Page to the PC, without description, with load header D - Dump current Chapter to the PC, without descriptions, with load headers # - Dump current Page to the PC as ASCII s - print Sytem info - Chapter, Page, Slot 'comment' - ignored, readAct:,ReadSerCmnd: processes this - saves time X,x - end to enable reprogram