yahboom
HomeTutorialsProduct
Solution
Blog
Online Store
About Us
EN/中文
Store
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 Raspberry Pi

Instructions for use of 180 degree servo --- Raspberry Pi

1.Raspberry Pi pin diagram

2

2. Hardware wiring

1.Connect the red wire (positive pole) of the servo to the 5V of the Raspberry Pi 2.Connect the brown wire (negative pole) of the servo to the GND of the Raspberry Pi 3.The yellow wire (signal wire) of the servo is connected to the physical pin of the Raspberry Pi motherboard (pin 33), BCM code (13)

Note: The GPIO of the Raspberry Pi is relatively fragile, and it is easy to burn the Raspberry Pi when driving high-current devices such as servos and motors. It is recommended that 5V and GND be powered by other 5V power supplies.

For other power supplies, please refer to the wiring below

1.Connect the red wire (positive pole) of the servo to the positive pole of the 5V battery 2.Connect the brown wire (negative pole) of the servo to the negative pole of the 5V battery 3.The yellow wire (signal wire) of the servo is connected to the physical pin of the Raspberry Pi motherboard (pin 33), BCM code (13) 4.Turn on the Raspberry Pi and connect any GND interface on the board to the negative terminal of the battery.

3.Upload and run the program

Upload the servo.py file in the folder to the root directory of the Raspberry Pi and enter the following command to run

python servo.py

4.Phenomenon

After running the program. The servo will rotate from 0-45-90-135-180-135-90-45-0.

 

For Raspberry Pi Pico
For MSPM0G3507

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/中文