8.Driver library and communication

In order to facilitate control, the underlying firmware of the robot arm expansion board is developed separately and provides interface calls to control bus servos, PWM servos, RGB lights and buzzers.

The relevant underlying driver source code has been packaged into a python library, and the system files provided by Yahboom have already installed this library file. If you want to transplant it to your own system, you can find Dofbot.zip in the code folder of the course materials, and then put the compressed package into the user directory of the virtual machine.

Open a terminal and enter the following command to decompress.

After successful decompression, the following interface will appear

Enter the following command to install it on your system.

Enter the user password and press Enter to confirm.

If you see the installation prompt Arm_Lib=x.x.x version number, the installation is successful.