Q$n&t_*HuWVdl-dRstarti~LeftLeftRLeftFRightFRightRRightLDelayD MoveForwardMoveCoilShipY<ShipX  MoveBackwardMoveLeftgobubz MoveRightFqB/MoveLeftForwardSLCMoveLeftBackward\MoveRightForward#rMoveRightBackwardnextIMoveForwardLeftMoveForwardRightAPlaybackTHENGOTOtXXTwoCoilsCoilslocate12AnswerSaveItMainFinishedPressBetaWalledn NullSettingReadPortForward` GoForward GoBackwardxGoLeftGoRightlocate5lenddiGetDelaycolor1 DelayEntry DelatEntryResponseGetFile StartMovercontinue-JoPRINtARdelArobdir robdir.txt5FileFilename PlayBackMovesMakeSampleData}color15cnextcnextr CalcTheStick StartHereShutdownCHRlpt'd _dd Vfg _dwnd p;g _dwnd pd;ep  _f  * Robot Controller Program* Written by Vince Long May 2001 Revised October 2002 * *  -> Program Starts Here <-  Turn off the Parallel Port  Read the arrays  Put up the title"  Ask if they want to calibrate the joystickw *( Find the Address of the Parallel Portd _dd V6g _dwnd p;g _dwnd pd;ep  _f d}^e _dd!V _ _f _dd!V _W _f _dd!V _* _f&ssesdsdse m************************se sdsdse mRobot Controller Programsesdsdse m************************se sdsdse m Playback Moves Version"sesdsd!se m -------------"se sdsd%se m by Vince Long"sesdsd)se m************************sesdse se m0Do you wish to calibrate your joystick? (Y or N) sese m Press 'ESC' if you wish to quit.F  _ _mdB _YmN"]t[ _YmY"][ _e ][[ *  Read the Input Lines*! to Calibrate to this Computer* *, sey! -sdsem********************sdsemJoystick Calibrationsdsem******************** * Read the Back Button* *sd)se m+Push the Joystick Forward or Press Button 1"F ey! < < -qc4 < SFey! -cdV FV k?cd * Read the Back Button* *sd)se m,Push the Joystick Backward or Press Button 2F ey! < < -qc& < `Fey! -cXV FV k?cd| * Read the Left Button *sd)se m/Push the Joystick to the Left or Press Button 3"F ey! < < -qc < nFey! -cN V FV k?cdr  * Read the Right Button *sd)se m0Push the Joystick to the Right or Press Button 4F ey! < < -qc < xFey! -cB V FV k?cdf  "* Get the delay value. Thise$ slows down the stepping sequence" and the value varies depending! on the speed of the computer.g "*~ ssesdsdse m!*********************************"sesdsdse mEnter a Delay Value"sdse m(386 = 25; Pentium 400 = 3000)"sesdsd%se m!*********************************"sesdsd!se m-->"  Z da@ sesd)$m@The value of the delay is zero. You need to enter another value.sese $m Press a Key"F$  _ _md [ P "*!  The Main program starts here* "*(ssesdsdse m************************se sdsdse mRobot Controller Programsesdsdse m************************se sdsdse m Playback Moves Version"sesdsd!se m -------------"se sdsd%se m by Vince Long"sesdsd)se m************************sesd "* -Turn off the parallel port -Initialize variablesl "* dd se se m.Do you wish to open an existing file? (Y or N)sese m Press 'ESC' if you wish to quit. F  _ _mdZ _YmY"][ _YmN"][ _e ][[ $*& This part done the main moving and saving of the move sequences $* *sm moves.rob" 5 5dsesdsdsem*********************"sesdsdse mRobot Moving Sequence"sesdsdsem*********************"sesdsd)se mPosition the Robotse se mPress a key to continue" F  _ _mdsd)se m1Move the Robot using the controller or arrow keys"se se m Press 'ESC' when done "sese m********************sese m********************V F  _ _d mH"][ _d mP"][ _d mK"][z _d mM"][ ey! S]0[ ey! `]J[ ey! n]d[z ey! x]~[sesem _e cd dd  * PlayBack the Moves *  Assesdsdsem*******************"sesdsdsemPlayback Movessesdsdsem*******************"sesdsd)semPosition the Robotse sem/Press a key to start or 'ESC' to skip playback."F  _ _mdjd  Wd)eV odeOVs Ws oe  of Wfsesdsese m********************sese m********************sesdsese m-Press 'ESC' if you wish to stop the playback." _e ][ 5d dtH d   qa2 V  F V k?cdP ey!eo]Veyd[# mF"]lY mR"]Y mV"]Y mX"]Yz  # mqad d[P e ad[P bd  dssesdsdsem*******************"sesdsdsem Done "sesdsdsem*******************" Wd)eVd odeOVXs Ws oe  of Wfsesdse se m,Do you want to save this move file? (Y or N)  YmY"][ YmN"][[ * Save the File *  sesdsdsem*******************"sesdsdsem Save the Filesesdsdsem*******************"sesdse sd m<Enter a filename (max 8 characters, no spaces, no extension)    -d!_ax Wd)eV odeOVs Ws oe  of Wf se sd) mToo many characters! sese m#Press a Key to Reenter the Filename" F  _ _mdT [P  e $dqaz Wd)eV odeOVe  of Wf se se  mNo Spaces, Please! sese m#Press a Key to Reenter the Filename" F  _ _mdV [Pm moves.rob"d  m.robd  dtHd d }  bd d[ dNsesemMoving Forward "F dd!V   _d V _f f d]od}mF" mqey! -ucR[V~ sesemMoving Backward F d!ddxW   _d V|  _f f d] o d}mR" mqey! -uc2 [VN!sesemTurning Right F dd!V`!  W _d VT! _f f d]r!o d}mV" mqey! -uc![V"zsesemTurning Left F dd!V8"  * _d V," _f f d]J"o d}mX" mqey! -uc![V * This section reads a list off saved robot files from theo hard drive and lets the user select one. *B&sd _mecho offmdel robdir.txtmdir /b *.rob > robdir.txt"m robdir.txtddtH# _d _d _b#dmdel robdir.txt deV,&sd sd d)c]<$m "sesd se sdm - "sesd sd sesesd ese sdm - "sesd esd se(sesd ese sdm - "sesd esd se<sesd e-se sdm - "sesd e- fsesd) m/Type in the number of the file you wish to open" - - 5[ANN`' dsNN# both wheels forward - variable:DI& 136,204,68,102,34,51,17,153I# right wheel forward - variable:RI ' 137,193,67,98,38,52,28,152 " left wheel forward - variable L 152,28,52,38,98,67,193,137R _eAeZVV(mmoves" _ m.robdd}dde E