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

Wiring Diagram

Connect all parts together as shown below, dial the switch to UART/COM side.

Connection 1

Other Preparation Work

  1. Ensure the USB driver is installed correctly.
  2. Dial the switch on the PWM board to UART/COM side.
  3. 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:

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Tick/untick to enable/disable PWM control.

Was this article helpful?

TOP