by hivemind » Tue Jul 25, 2006 6:35 pm
by hivemind
Tue Jul 25, 2006 6:35 pm
I could be wrong, but i believe the FILL 255,10000 is acting as some kind of a memory clear. For instance, when i test my robot i usually make an extremely small routine consisting of turning the motors on, setting the direction, the speed, a delay so i can move away and watch and then some poses (which of course would contine to get more complicated as the routine progreses) but i leave out the goto auto, the fill, all of the ir stuff and the program is only afew hundred bytes making it easy for my test quickly.
BUT, being so small, if i have a program error, say perhaps i throw a return in at the end of my routine with nothing to return to, the robot will go back to a previous program that i have written (for example: the overall template program) and usually has an error and i have to restart him. I believe with the FILL 255,10000 its filling the first 10,000 of memory so that a mistake would less likely screw up the program.
By removing this your program is all of a sudden 10,000 bytes smaller (how nice) and as long as you check your program you should be set. If you want to be safe you can keep it in there, but i usually remove it when im testing.
As for interupts, i think the closest you will get to that will be gyros. You can check things such as the accelerometer as soon as the program gets up, and anywhere in between, but i dont know of any way through robobasic to have interupts. (im new to this, so i could certainly be wrong, heh, i hope i am here)
hope that helps a little-
I could be wrong, but i believe the FILL 255,10000 is acting as some kind of a memory clear. For instance, when i test my robot i usually make an extremely small routine consisting of turning the motors on, setting the direction, the speed, a delay so i can move away and watch and then some poses (which of course would contine to get more complicated as the routine progreses) but i leave out the goto auto, the fill, all of the ir stuff and the program is only afew hundred bytes making it easy for my test quickly.
BUT, being so small, if i have a program error, say perhaps i throw a return in at the end of my routine with nothing to return to, the robot will go back to a previous program that i have written (for example: the overall template program) and usually has an error and i have to restart him. I believe with the FILL 255,10000 its filling the first 10,000 of memory so that a mistake would less likely screw up the program.
By removing this your program is all of a sudden 10,000 bytes smaller (how nice) and as long as you check your program you should be set. If you want to be safe you can keep it in there, but i usually remove it when im testing.
As for interupts, i think the closest you will get to that will be gyros. You can check things such as the accelerometer as soon as the program gets up, and anywhere in between, but i dont know of any way through robobasic to have interupts. (im new to this, so i could certainly be wrong, heh, i hope i am here)
hope that helps a little-