Zero2 QL commands - version$ = '5.5' -------------------------------------------------------------------- [help_scrn_0] ** INTRODUCTION **' The program allows a string of commands to be assembled in short- term-memory and played both with and without Zero2 connected. The command string may be edited and saved, as an Act, to a long-term- memory Mind file. Acts may be viewed, run and retrieved and can be called. Mind files can be edited with a text editor. Acts start with a colon name (8 chars max) and end with a blank line. A Log file is created. - Edit directory$ (~line 170) to change the Mind directory. - Minds are files, current one loaded to RAM. - If doindex then run :index when mind is loaded. - Acts are saved to the start of a Mind. - Acts are searched for from the start of a Mind so only the first one with a given name will be found. * Commands marked * can be learned. -------------------------------------------------------------------- [help_scrn_1] COMMANDS System help oops quit noRobot doRobot zinit zz imap cmap smap names nonames cnames drawR nodrawR forget learn nolearn unlearn replay rstep mind compact rlist ralter rfix rsave mnames mlist mexec mget play bplay jump toX toY goXY goName getAct toHere atName alert buzz doindex noindex Minds Mmake Robot MIND ihome home unwind head alert buzz jc wt n msg $ sb n ROBOT FD n BK n RT n LT n s n zz fl fr bl br PEN pu pd peninit LIGHTS ll lr ls lo flsh n flht n HORN hh hl hn ho hoot n [space] stop, [Ctrl]+[Space] to break -------------------------------------------------------------------- [help_scrn_1a] COMMANDS Robot Skills toAng toDist sline fline flineQ flineEnd [space] stop, [Ctrl]+[Space] to break -------------------------------------------------------------------- [help_scrn_2] System Commands - 1 help - display help screens oops - recover from an error, if possible zinit - initialise robot and serial channel noRobot - disable robot, work with just the screen robot doRobot - enable robot zz * Z sleep, turn off power to motors imap - initialise mapwith robot at home cmap - clean map, rubout displayed moves smap - scale map, rubout displayed moves names - print names on map nonames - do not print names on map cnames - clean names - forget named locations on map drawR * draw robot on map nodrawR * do not draw robot on map alert * order computer to sound 'alert' buzz * order computer to sound 'buzz' -------------------------------------------------------------------- [help_scrn_2a] System Commands - 2 forget - commands in short term memory are erased learn - commands executed are learned nolearn - commands executed are not learned unlearn - last command is executed in reverse and forgotten replay - learned commands are executed in order bplay - learned commands are executed in reverse order rstep - learned commands done one at a time rlist - list commands in short term memory ralter - alter routine in short term memory rfix - end altering of short term memory rsave - save learned moves to Mind as an Act and to Mind file mnames - list names of Acts in long term memory mlist - list an Act mexec - execute an Act mget - copy an Act to short term memory -------------------------------------------------------------------- [help_scrn_2b] System Commands - 3 mind - learn * command '/' and mind name to change a Mind compact - compact repeated learned moves from line following etc Mmake - create a Mind file Minds - list Minds doindex * autorun :index noindex * do not run :index -------------------------------------------------------------------- [help_scrn_3] Robot - Skills toAng n * set toAngle for skills to 'n' toDist n * set toDistance for skills to 'n' sline * search for line over angle A and distance D fline * follow line for distance D or to end flineEnd * follow line to end flineQ * follow line quickly for distance D or to end -------------------------------------------------------------------- [help_scrn_3a] Robot Commands - Mind jump - prompt for * command '!' to jump to another Act atName - prompt for * command '@' and a name for current location goName - prompt for * command '>' to move to named location getAct - prompt for * command '^' copy an Act to short term memory play * play all learned commands in short term memory home * go to home position but don't unwind unwind * unwind umbilical until heading is 0 deg. jc * change to joystick control wt n * wait for 'n' 50'ths of a second ihome * set present position to be the home position toX * set goal X co-ordinate toY * set goal Y co-ordinate goXY * move to X,Y toHere * learn a move to current location msg 'cmnds' - send controller command(s) to robot and print reply -------------------------------------------------------------------- [help_scrn_4] Robot Commands - Body FD n * forward 'n' mm BK n * back 'n' millimetres LT n * left turn 'n' deg RT n * right turn 'n' degrees fl n * forward left deg fr n * forward right degrees bl n * backward left deg br n * backward right degrees pu * pen up pd * pen down ll * light left on hh * horn high tone on lr * light right on hl * horn low tone on ls * lights on hn * horns on lo * lights off ho * horns off flsh n * flash lights 'n' times hoot n * cycle horn 'n' times flht n * flash lights, and cycle horn 'n' times s n * step delay for motors, 1 is fastest sb n * send byte n to robot zz * Z sleep, turn off power to motors ==================================================================== Zero2 Arduino commands -------------------------------------------------------------------- Primary commands used 012345678 ?$#.() BDFLRU abcfhilmnprsw COMMANDS ======== [Esc],[Q] - stop, quit operations, go to command mode [.] - stop, end current operation - recording, playing, input [(] - 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 become the current Do and the old Do will be forgotten. [)] - end of a Do will show its location in EEPROM when played [0] - use page0 for the next cmnd or Act number [a][1-8] - Act to autorun on power on [1-8] Play act, or the Act to record, copy, load etc [p][1] - autoPower on, automatically disconnect 9v when stopped [p][0] - autoPower off, 9v power always on [F][digits][,] - Forwards - if no [digits] then 1 - units mm [B][digits][,] - Backwards - if no [digits] then 1 - units mm [R][digits][,] - turn Right - if no [digits] then 1 - units degrees [L][digits][,] - turn Left - if no [digits] then 1 - units degrees [D] - Pen down [U] - Pen up [P] - initialise Pen [f][l][digits][,] - forward left - if no [digits] then 1 - 1 mm is 1/2 degree [f][r][digits][,] - forward right - if no [digits] then 1 - 1 mm is 1/2 degree [b][l][digits][,] - backward left - if no [digits] then 1 - 1 mm is 1/2 degree [b][r][digits][,] - backward right - if no [digits] then 1 - 1 mm is 1/2 degree [m][digits][,] - actual degrees for 360 degrees [w][0-9,0] - wait seconds, 0=10 [n][0-9,0] - nap tenths second, 0=10 [s][1-9] - steptime/2 [+] - speed-up, steptime -=1 >=1 [-] - speed-down, steptime +=1 [u] - speed-up, steptime -=1 >=stepmin [d] - speed-down, steptime *=2 [m] - set speed-max for speed-up to current speed [s] - save speed [i][o] - Indicators off [r] - Indicator R on [l] - Indicator L on [i][0] - Indicators off [1] - Indicator R on [2] - Indicator L on [3] - Indicators on [h][o] - horn off [h] - horn high tone [l] - horn low tone [n] - horn (both tones) [h][0] - horn off [1] - horn low [2] - horn high [3] - horns on [Z][digits][,] - send a byte to robot [S][digits][,] - sound 76489 [T][digits][,] - talk say phoneme, SP0256 [$][l] - return line status [r][1-8] - record act [l][1-8] - load act [c])[1-8][1-8] - copy Act to Act [?][?] - print acts [a] - '??' prints all acts [0] - prints acts 0, and changes '??' to just print current page - (for QL zero2 program) [b] - print behaviour - thisprog,autoAct,f_autoPower,steptime,stepmin,stepScale360 [d] - dump all acts to PC without descriptions, suitable for loading [h] - print help Notes [(] - will show its location in EEPRO< when played eg (=263 [)] - will show its location in EEPRO< when played eg )=285 If a call to another Act is made from within Mind then the location to return to will be shown, eg (267) Acts by default are stored in page 1, 0 changes to page 0 for the next command only. Page 0 ia EEPROM bytes 0-255, Page 1 is EEPROM bytes 256-511 etc. Future use - [$][f] - return feeler status Future use - [$][g] - return ground status ====================================================================