Drivebase - change speed during driving #2413
Replies: 2 comments 3 replies
-
|
You could wait for an obstacle like this example: https://pybricks.com/learn/sensors/responding-sensor-values/#using-the-wait-until-block. And then instead of stopping as done here, this is where you could give a new drive command with a lower speed if you like. You can also combine movements without stopping, if that is what you mean: https://pybricks.com/learn/making-programs/basic-robot-navigation/#combine-movements-without-stopping So you could make the first command drive at some speed, and tell it not to stop at the end. Then drive another command at a new speed. It will change speed smoothly without stopping. |
Beta Was this translation helpful? Give feedback.
-
|
[EDIT] Replace the waits by the conditions you need. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I was wondering whether it is possible to change the drive speed while the drivebase is running, i.e. without stopping.
The use case is: coverig large distances at high speed but slow down towards the end to be able to stop abruptly, for example when sensign an obsactle.
I tried with a multitask, but configuring the driving speed does not seem to have any effect.
Beta Was this translation helpful? Give feedback.
All reactions