add wishlist add wishlist show wishlist add compare add compare show compare preloader icon-theme-126 icon-theme-161 icon-theme-138 icon-theme-027 electro-thumb electro-return-icon electro-brands-icon electro-payment
  • +1 (857) 226-1305
  • +86 18825289328

Modify Serial Port Configuration for PWM Servo Controller Arduino Development

1. Introduction

This tutorial applies to various Hiwonder PWM servo controllers, using the 16-channel PWM servo controller as an example. It explains how to modify the serial port configuration within the library files provided by Hiwonder when developing with multi-serial Arduino control boards such as Arduino Uno R4, Arduino Mega 2560, and Arduino Due. When using the Hiwonder Arduino UNO R3 controller, modification is unnecessary since the UNO R3 features only a single hardware serial port.

2. Operation Steps

Open the library file LobotServoController.cpp located in the 1. Tutorial. The file path is: 1. Tutorial\2. LSC-16 Controller Secondary Development\01 Arduino Development\Library File (import before the first use). The interface is shown in the figure below:

After opening the LobotServoController.cpp file, locate line 26 and line 28 as shown in the following figure:

Simply modify SerialX = &Serial1 and SerialX = &Serial to the corresponding serial port numbers according to specific project requirements.

Light
Dark