Example Code for Windows-PC Control
Last revision 2026/01/08
The article offers a comprehensive guide on using example code to control hardware like motors and LED strips via Windows PC. It covers necessary hardware and software preparations, wiring connections, and real-time adjustments using PWM software.
Hardware Preparation
- PC Windows 10
- Motor or LED strip
- Type-C cable
- Power Source(Voltage: 5V~24V Power>2A Select the suitable power according to the devcie you used)
Software Preparation
- USB Driver: Download from https://github.com/DFRobot/CH_Driver
Wiring Diagram
Connect all parts together as shown below, dial the switch to UART/COM side.

Other Preparation Work
- Ensure the USB driver is installed correctly.
- Dial the switch on the PWM board to UART/COM side.
- Download program package for Windows:
Program Package: Download from https://github.com/DFRobot/DRI0050_soft_V1.0. Unzip and run "Light and Motor Driver.exe" (no installation needed).

Software Interface:

- Connect the product to a PC via a USB Type-C cable. If the driver program is installed already, the software will automatically recognize it.
- Click the start button, the PC communicates successfully with PWM module, and now the PWM frequency and duty ratio can be adjusted in real-time.
- Adjustable Frequency ranges from 0 to 255. You can input manually or drag the control bar to revise. The frequency will be displayed on the right side of the interface.
- The product supports single-channel PWM control, so only the duty ratio of Channel 1 can be adjusted. Enter the duty ratio into the input box.
- Tick/untick to enable/disable PWM control.
Was this article helpful?
