yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
9G Servo PTZ📖
1.Drive servo
  • For Arduino
  • For Microbit
  • For Raspberry Pi Pico
  • For Raspberry Pi
  • For MSPM0G3507new
  • For MSPM0G3519new
2.Drive ultrasonic module
  • For Arduino
  • For Microbit
3.Drive servo platform
  • For Arduino-without servo
  • For Arduino-with servo
  • For Microbit
Download ZIP

Welcome to 9G Servo PTZ repository

For Arduino-with servo

The purpose of the experiment:

You can make a small labyrinth, put the smart car with the uploaded program in the maze, press the start button of the tail of the car, the LCD screen of the car shows the distance measured by the ultrasonic wave. If the distance from the obstacle is less than 32 cm in front, the servo is turned to the left and right, and the distance between the two sides of the ultrasonic sensor measurement is compared. The car turns to a more spacious direction.

Precautions:

If the LCD is not displayed, use a screwdriver to adjust the adjustable resistor.

If only the ultrasonic obstacle avoidance function is used, the display distance is not required, and the 1602LCD display and the yellow adjustable resistor are not installed.

List of components required for the experiment:

Arduino Smart Car* 1
USB data cable* 1
DuPont line * n
Breadboard* 1
1602 LCD screen* 1
Adjustable resistance* 1
Active buzzer* 1
Button * 1
Ultrasonic sensor*1
10K resistor * 1

image.pngimage.png    image.png       image.png

image.pngimage.png     image.png     image.png

 image.png     image.png

Experimental code analysis:

//============================yahboom========================================
//  Intelligent car ultrasonic obstacle avoidance(servo)
//In the program, the number part of the computer is shielded,
//and printing will affect the speed of the car's reaction to obstacles.
//When debugging, you can open the shield content Serial.print
//and print the measured distance.
// The PWM value and delay of the control speed are adjusted,
//but it is still in accordance with the actual conditions
//and the actual quantity of electricity is adjusted.
//=============================================================================
//#include

Experimental steps:

1. We need to open the code of this experiment: avoid_servo.ino,click“√” under the menu bar to compile the code, and wait for the word "Done compiling " in the lower right corner,as shown in the figure below.

image.png

2. In the menu bar of Arduino IDE, we need to select 【Tools】---【Port】--- selecting the port that the serial number displayed by the device manager just now, as shown in the figure below.image.png

3. After the selection is completed, you need to click “→”under the menu bar to upload the code to the Arduino UNO board. When the word “Done uploading” appears in the lower left corner, the code has been successfully uploaded to the Arduino UNO board, as shown in the figure below.

image.png

4.Please wire the Smart Car as shown below.

image.png

5.Put the smart car in the labyrinth, press the start button of the tail of the car, the LCD screen of the car displays the distance measured by the ultrasonic sensor, and avoid obstacles in the labyrinth.

image.png


For Arduino-without servo
For Microbit

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文