Devan
Apr 28th, 2004, 02:40 AM
Hi all....tAKE A LOOK AT THIS...
Call DriveDCMotors(0,0,-1,-1)
Call DriveDCMotors(0,0,1,-1)
Call DriveDCMotors(0,0,0,-1)
Call DriveDCMotors(0,0,-1,1)
Call DriveDCMotors(0,0,1,1)
This is part of a program function i wrote for parallel port program which will enable a robot to move...it only uses 2 motor, anyway i dont think so that matters cuz i haf already got it working...it works perfectly fine...My question is this...the current function as i haf shown above is written in the source code itself....What i want to do is to read the same functions from a text file and execute it.For example lets say that i wrote the above codes on a text file and saved it.My program should 1st read the text file, which has the codes above, and then it should be able to perform the task of the codes written.I would like to make things clear again that my program works, and so does the code i gave above, i only want to know how to read and execute the code from and external file rather than by predifining the movements in the underlying codes itself. It should be programmable. Please anyone do help me out in this, as i need it urgently.Thank U.
Call DriveDCMotors(0,0,-1,-1)
Call DriveDCMotors(0,0,1,-1)
Call DriveDCMotors(0,0,0,-1)
Call DriveDCMotors(0,0,-1,1)
Call DriveDCMotors(0,0,1,1)
This is part of a program function i wrote for parallel port program which will enable a robot to move...it only uses 2 motor, anyway i dont think so that matters cuz i haf already got it working...it works perfectly fine...My question is this...the current function as i haf shown above is written in the source code itself....What i want to do is to read the same functions from a text file and execute it.For example lets say that i wrote the above codes on a text file and saved it.My program should 1st read the text file, which has the codes above, and then it should be able to perform the task of the codes written.I would like to make things clear again that my program works, and so does the code i gave above, i only want to know how to read and execute the code from and external file rather than by predifining the movements in the underlying codes itself. It should be programmable. Please anyone do help me out in this, as i need it urgently.Thank U.