Question regarding movement of robot?
I know that this might sound easy but I need help...
Its regarding the distance travelled by the Boe-Bot
I know how to make it move forward, using Pulsout and also make it turn right or left
But i want to know, which code would I use if i want to make it travel in a direction for a specific distance.
Please can someone help or lead me to the right direction, thanks!
Its regarding the distance travelled by the Boe-Bot
I know how to make it move forward, using Pulsout and also make it turn right or left
But i want to know, which code would I use if i want to make it travel in a direction for a specific distance.
Please can someone help or lead me to the right direction, thanks!
Comments
Without the encoder the best you can is to run the motors for a specific period of time. It will not be accurate and it will be a little different every time but you can come pretty close. One thing you can do to improve accuracy is to come to a full stop after every move rather than stringing moves together. For example, go forward, then stop for half a second, then turn, stop, go forward,stop, etc... While stopped you should still be sending centering pulses (PULSOUT 750) to the wheel servos so that they don't coast.
Rich H
Edit: Rich types faster than I do!
And he points out a little-known but very useful fact: pulsout 750's apply dynamic braking to a CR servomotor. If you simply stop sending pulses, the motor will coast down to a stop more slowly, likely overshooting your intended location.
Another thing is how does the LOOP work? So if DO and LOOP, it will keep on going straight, where as I need to make it go straight then stop at a point then right...If i do loop, wouldnt i keep going straight forever? The distance i need to travek straight, that i can do like trial and error but the loop is the problem...
btw if i dont loop and go pulsout, wouldnt it keep on going on and on?
while in loop, i could make it go straight with a WHILE condition...and run a counter along with it with time (Pause 1000) and i could set that the loop would go on until myCounter= (i would enter the time calculated)...
now i just need help with while, how do i put it in the loop? any sample codes?
Do you need help locating these resources?
Rich H