108271 Views
83628 Views
56847 Views
48511 Views
47826 Views
47705 Views
Arduino Plug and Make Kit Review
Pi to Pico W Bluetooth Communication
Two-Way Bluetooth Communication Between Raspberry Pi Picos
Gamepad 2
Picotamachibi 2
Learning System updates
Introduction to the Linux Command Line on Raspberry Pi OS
How to install MicroPython
Wall Drawing Robot Tutorial
BrachioGraph Tutorial
Intermediate level MicroPython
Introduction to FreeCAD for Beginners
KevsRobots Learning Platform
70% Percent Complete
By Kevin McAleer, 1 Minute
To prevent collisions with obstacles, use bot.distance to measure the distance between the object and your bot. If the measured distance is less than a specified threshold (e.g., 5 cm), stop the bot and move it backward to maintain a safe distance from the obstacle.
bot = Burgerbot() while true: if bot.distance <= 5: bot.stop() bot.backward(1) else: bot.forward(1)
To maintain a consistent distance from an object, first measure the distance between the object and your position. Move forward until the object is at the desired distance, then stop. If the object is closer than the desired distance, move backward until the desired distance is achieved. This process allows you to effectively follow an object while maintaining a set distance from it.
< Previous Next >