Control of driving or stopping