by hivemind » Tue Nov 07, 2006 12:26 pm
by hivemind
Tue Nov 07, 2006 12:26 pm
Well it is good that you have gotten this far -gyros and accelerometer are awesome. I never tried the sonar myself, but I think I recall reading an old forum post about it, you may want to search around.
To briefly answer your questions,
1) Well, no. That is to say, you do not HAVE to turn motors on or any of that. I would recommend the Fill 255,10000 and GOTO AUTO, as it places the start of your code in the correct spot, but once again, you do not need this.
2) Always. But being as RoboBasic is very basic (in the literal sense of the word) as far as coding goes, there isnt too much to worry about. That being said, you dont have much of the processor to work with, so doing make a long algorithm for something that can be done easily using a FOR loop or something to that extent.
Furthermore, you should not have RETURN 's in bad places in your code where you have nothing to return to. That doesnt end up well.
3) a byte = 256 character (the value that can be sent to the sensors or servos is that of a byte) and an integer = 16bit character. The integer is bigger, so you shouldnt really use it if you dont have to.
hope that helps a little.
Well it is good that you have gotten this far -gyros and accelerometer are awesome. I never tried the sonar myself, but I think I recall reading an old forum post about it, you may want to search around.
To briefly answer your questions,
1) Well, no. That is to say, you do not HAVE to turn motors on or any of that. I would recommend the Fill 255,10000 and GOTO AUTO, as it places the start of your code in the correct spot, but once again, you do not need this.
2) Always. But being as RoboBasic is very basic (in the literal sense of the word) as far as coding goes, there isnt too much to worry about. That being said, you dont have much of the processor to work with, so doing make a long algorithm for something that can be done easily using a FOR loop or something to that extent.
Furthermore, you should not have RETURN 's in bad places in your code where you have nothing to return to. That doesnt end up well.
3) a byte = 256 character (the value that can be sent to the sensors or servos is that of a byte) and an integer = 16bit character. The integer is bigger, so you shouldnt really use it if you dont have to.
hope that helps a little.