.. note:: Hello, welcome to the SunFounder Raspberry Pi & Arduino & ESP32 Enthusiasts Community on Facebook! Dive deeper into Raspberry Pi, Arduino, and ESP32 with fellow enthusiasts. **Why Join?** - **Expert Support**: Solve post-sale issues and technical challenges with help from our community and team. - **Learn & Share**: Exchange tips and tutorials to enhance your skills. - **Exclusive Previews**: Get early access to new product announcements and sneak peeks. - **Special Discounts**: Enjoy exclusive discounts on our newest products. - **Festive Promotions and Giveaways**: Take part in giveaways and holiday promotions. 👉 Ready to explore and create with us? Click [|link_sf_facebook|] and join today! Video 4: Obstacle Avoidance with Ultrasonic ============================================ This video tutorial covers obstacle avoidance using an ultrasonic sensor in the PiCar-X robot: * **Introduction to Ultrasonic Sensor**: Explains how to use the ultrasonic sensor for measuring distance and controlling the car's movement. * **Python Code Walkthrough**: Details the Python code for obstacle avoidance, including variable definitions and conditional movement logic. * **Creating and Running Custom Scripts**: Shows how to write and execute custom scripts for U-turns and obstacle reactions. * **Practical Demonstrations**: Provides demonstrations of the robot's obstacle avoidance capabilities on different surfaces. * **Code Saving and Updating**: Explains how to save and update scripts on the robot. This lesson offers an essential guide to implementing ultrasonic sensor-based obstacle avoidance in the PiCar-X robot. **Video** .. raw:: html **Related On-line Tutorials** * :ref:`py_avoid`