yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
16-channel Servo Debugging Board📖
1.Introduction
  • Introduction
2.Arduino code
  • IIC control servo
  • Serial control servo
3.pico code
  • IIC control servo
  • Serial control servo
4.Raspberry Pi code
  • IIC control servo
  • Serial control servo
  • Raspberry Pi 5 serial port control
5.Microbit code
  • IIC control servo
  • Serial control servo
  • Potentiometer control servo
6.Jetson NANO code
  • IIC control servo
  • Serial control servo
7.STM32 code
  • Serial port control servo
  • IIC controls the servos
8.MSPM0 code
MSPM0G3507
  • Serial port control servo
  • IIC control servo
MSPM0G3519
  • Serial port control servonew
  • IIC control servonew
Download
  • Code
  • APP(Android/iOS)
Download ZIP

Welcome to 16-channel Servo Debugging Board repository

Serial control servo


1. Learning goals

In this course, we mainly learn to use Raspberry Pi and 16-channels servo debugging board to control the servo through serial port.

2. Preparation

Connect the TXD and RXD of the module to the IO15 and IO14 pins of the Raspberry Pi board. VCC and GND are connected to 3.3V and GND of Raspberry Pi board respectively. As shown below.

image.png 

3. Assign the serial port of the Raspberry Pi

3.1 Raspberry Pi needs to assign ttyAMA0 port to GPIO serial port TXD0, RXD0, the specific method is as follows.

Enter sudo raspi-config to enter the Raspberry Pi system configuration interface, and select the fifth Interfacing Options:

image.png 

Enter “P6 Serial”.

image.png 

Choose to close the serial port log in function and open the hardware serial port debugging function.

image.png 

image.png 

Click “OK”.

image.png 

Exit raspi-config settings, and restart the Raspberry Pi according to the prompts.

3.2 Edit the config.txt file in the /boot directory: sudo nano /boot/config.txt

Add the following two lines to the end:

dtoverlay=pi3-miniuart-bt

force_turbo=1

As shown below.

image.png 

3.3 Press “Ctrl+O” save file. Press “Ctrl+X” save file.

3.4 Input following command to restart Raspebrry Pi.

sudo reboot

After restarting the Raspberry Pi, enter ls /dev -al , you can see that the two serial ports have changed positions. As shown below.

image.png  

4. Code

Please refer to 16CServo-uart.py

Configure the serial port.

image.png 

Serial port control servo function

image.png 

Set the servo S1 angle to 0

 

4. Running code

Input following command in the terminal to run the program.

python 16CServo-uart.py

5. Phenomenon

After the program is run successfully. The servo will rotate 0°, after 2s it will rotate 180°.


IIC control servo
Raspberry Pi 5 serial port control

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
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文