Welcome to 16-channel Servo Debugging Board repository
Serial control servo
1. Learning goals
In this course, we mainly learn to use Jetson NANO and 16-channel servo debugging board to control the servo through IIC.
2. Preparation
Connect the TX and RX of the module to the Pin10 and Pin8 pins of the Jetson NANO board. VCC and GND are connected to 3.3V and GND of Jetson NANO respectively.
Jetson NANO needs to open the serial port permission.
Input following command to open the serial port permission.
sudo chmod 777 /dev/ttyTHS1
3. Code
About code, please view 16CServo-uart.py file.
3.1 Define the device address of the module
3.2 The serial port controls the servo function.
3.3 Set the angle of the servo S1 to 0
4. Module protocol
5. Running code
Input following command in command terminal of jetson nano.
python3 16CServo-uart.py
6. Experimental phenomena
After the program is run successfully. The servo will rotate 0°, after 2s it will rotate 180°.